Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server seg fault after attempted internet game #45

Closed
her001 opened this issue Aug 4, 2014 · 5 comments
Closed

Server seg fault after attempted internet game #45

her001 opened this issue Aug 4, 2014 · 5 comments

Comments

@her001
Copy link
Contributor

her001 commented Aug 4, 2014

We attempted a game via the internet, using a VPS to prevent the routing issues currently present in SNIS when not on a lan. After some testing, it seemed that multiple ships didn't have a problem joining snis_server, but if a new crew member joined there was a segfault. The server works fine on a local network.

Here is some gdb output:

(gdb) r 192.227.164.140 0 Arch VPS
Starting program: /usr/bin/snis_server 192.227.164.140 0 Arch VPS
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Lua setup done.
[New Thread 0x7ffff6ecd700 (LWP 3757)]
[New Thread 0x7ffff64cc700 (LWP 3758)]
found!
[New Thread 0x7ffff58bf700 (LWP 3767)]
[New Thread 0x7ffff4ebe700 (LWP 3768)]
[New Thread 0x7fffe7fff700 (LWP 3776)]
[New Thread 0x7fffe75fe700 (LWP 3777)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff6ecd700 (LWP 3757)]
0x00007ffff728ceb8 in __lll_unlock_elision () from /usr/lib/libpthread.so.0
(gdb) bt
#0  0x00007ffff728ceb8 in __lll_unlock_elision () from /usr/lib/libpthread.so.0
#1  0x000000000042ff5d in ?? ()
#2  0x000000000043035e in ?? ()
#3  0x00007ffff7283124 in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007ffff6fb74bd in clone () from /usr/lib/libc.so.6
@smcameron
Copy link
Owner

That's a weird looking backtrace. It looks like it's dying while trying to create the per_client_read_thread(), I think.

It might be here:

static void per_client_read_thread(void / struct game_client */ *client)
{
struct game_client *c = (struct game_client *) client;

    /* Wait for client[] array to get fully updated before proceeding. */
    client_lock();
    get_client(c);
    client_unlock(); <---- in here???

But actually, I don't think so. I don't think it's making it out of pthread_create() alive.

Hmm. That is a weird one. Kind of hard to debug without being able to reproduce it here.

Let me know if you get any more info about it, but right now the source of the problem is a mystery to me.

@smcameron
Copy link
Owner

Old bug, but by chance, was this on Arch linux?

Wondering if it was the same as this: https://bugs.chromium.org/p/chromium/issues/detail?id=484096
or this: https://bbs.archlinux.org/viewtopic.php?id=197100

@her001
Copy link
Contributor Author

her001 commented Jan 24, 2017

This was on Arch. Perhaps I can do some more testing soon.

@hugglesfox
Copy link
Contributor

The bug that @smcameron was describing can be fixed by installing the intel microcode and re-configuring grub.

sudo pacman -S intel-ucode

sudo grub-mkconfig -o /boot/grub/grub.cfg

@smcameron
Copy link
Owner

I'm going to close this because it's rather old, and doesn't seem to be a reproducible or common problem and seems to have a plausible external cause identified. Feel free to re-open if need be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants