Results 1 to 9 of 9

Thread: Cod2 server crashing

  1. #1
    Private
    Join Date
    Jan 2016
    Posts
    12
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Cod2 server crashing

    Hello everyone, I have a problem with my server its randomly crashing how do I find out what is the cause?
    Its version 1.3 without libcod.

    This is from syslog:
    ubuntu kernel: [587574.708776] cod2_lnxded[6798]: segfault at 84 ip 00000000080ebf71 sp 00000000ffc72160 error 4 in cod2_lnxded[8048000+135000]
    ubuntu kernel: [588315.019652] cod2_lnxded[6876]: segfault at 84 ip 00000000080ebf71 sp 00000000ffea0ee0 error 4 in cod2_lnxded[8048000+135000]

    Also something off-topic, is it possible to disable masterserver listing? Hexing the cod2_lnxded or something?
    The spamming heatbeat thing
    Sending heartbeat to cod2master.activision.com

  2. The Following User Says Thank You to v1rto For This Useful Post:

    kung foo man (19th August 2020)

  3. #2
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    631
    Thanks
    196
    Thanked 429 Times in 289 Posts
    The segfault message points to this function:

    PHP Code:
    BOOL __cdecl BG_IsWeaponValid(int a1int a2)
    {
      
    bool v2// bl
      
    bool v3// cl
      
    int v4// eax
      
    BOOL result// eax

      
    v2 a2 >= && a2 <= bg_iNumWeapons;
      
    v3 0;
      if ( (*(
    _DWORD *)(a1 * (a2 >> 5) + 1348) >> (a2 0x1F)) & )
        
    v3 v2;
      
    v4 bg_weaponDefs[a2];
      if ( *(
    _DWORD *)(v4 132) || a2 == *(char *)(a1 1365) || a2 == *(char *)(a1 1366) || a2 == *(_DWORD *)(v4 876) )
        
    result v3;
      else
        
    result 0;
      return 
    result;

    The address 80ebf71 points to:
    PHP Code:
    if ( *(_DWORD *)(v4 132) || a2 == *(char *)(a1 1365) || a2 == *(char *)(a1 1366) || a2 == *(_DWORD *)(v4 876) ) 
    Are you running any mods? On what kind of specifications does your server run?
    Last edited by Mitch; 18th August 2020 at 18:51.

  4. The Following 2 Users Say Thank You to Mitch For This Useful Post:

    kung foo man (19th August 2020),v1rto (19th August 2020)

  5. #3
    Private
    Join Date
    Jan 2016
    Posts
    12
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Its running only zPAM 3.0 the successor of zPAM 2.07
    zPAM300b1.iwd

    Its a Xeon E3 vps with 2gb ram running ubuntu 12.04 x64
    Last edited by v1rto; 18th August 2020 at 21:12.

  6. The Following User Says Thank You to v1rto For This Useful Post:

    kung foo man (19th August 2020)

  7. #4
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    1,973
    Thanks
    1,963
    Thanked 1,066 Times in 740 Posts
    timescale 0.01

  8. #5
    Private
    Join Date
    Jan 2016
    Posts
    12
    Thanks
    1
    Thanked 3 Times in 3 Posts
    So libcod is the only solution? I wonder why is this happening just now, Ive been running the same binary for years without any problem, is the pam mode causing it?

    Also is there a libcod build with just patches/fixes, no new features as I dont need any?
    Last edited by v1rto; 19th August 2020 at 12:55.

  9. #6
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    1,973
    Thanks
    1,963
    Thanked 1,066 Times in 740 Posts
    If you don't use any new methods/functions/callbacks provided by libcod, it is basically just patches/fixes/protections

    About pam mode, maybe some random users force the server/mod using non-available weapons, like the openScriptMenu hack to pick weapons from the enemy side? That could explain the randomness in crashing
    timescale 0.01

  10. #7
    Private
    Join Date
    Jan 2016
    Posts
    12
    Thanks
    1
    Thanked 3 Times in 3 Posts
    I made a stripped down version of libcod only for CoD2 1.3 with only patches/fixes/protections/removed server listing on master
    Seems to work okay, not sure if I can remove more unused functions/declarations to have less size be more compact..

    https://github.com/hoesman/libcod2_1.3
    Last edited by v1rto; 19th August 2020 at 20:05.

  11. The Following User Says Thank You to v1rto For This Useful Post:

    kung foo man (20th August 2020)

  12. #8
    ... connecting
    Join Date
    Jul 2018
    Posts
    5
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by v1rto View Post
    Its a Xeon E3 vps with 2gb ram running ubuntu 12.04 x64
    "Ubuntu 12.04 LTS reached its regular End of Life on April 28, 2017. No more package updates, including security updates, will be accepted to the 12.04 primary archive."

  13. #9
    Private
    Join Date
    Jan 2016
    Posts
    12
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by somewhat windy View Post
    "Ubuntu 12.04 LTS reached its regular End of Life on April 28, 2017. No more package updates, including security updates, will be accepted to the 12.04 primary archive."
    It doesnt imply its less secure than newer versions, and that doesnt cause the cod2 segfault

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •