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

Seems to be broken on 32-bit systems lately (~2017-03-05) #98

Closed
smcameron opened this issue Mar 7, 2017 · 2 comments
Closed

Seems to be broken on 32-bit systems lately (~2017-03-05) #98

smcameron opened this issue Mar 7, 2017 · 2 comments

Comments

@smcameron
Copy link
Owner

Not sure when it broke, but it seems to be broken now. I don't actually have any 32 bit systems to test on, but this is the report I'm getting.

It's getting "stack smashing detected", and crashing.

Unfortunately, not leaving an intact stack.

artemis@artemis4 ~/space-nerds-in-space $ sudo file core
core: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), too many program header sections (433)
artemis@artemis4 /space-nerds-in-space $ sudo echo bt | gdb -c core ./snis_client
GNU gdb (Ubuntu 7.7.1-0ubuntu5
14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./snis_client...done.
/home/artemis/space-nerds-in-space/core: Permission denied.
(gdb) No stack.
(gdb) quit
artemis@artemis4 ~/space-nerds-in-space $

Compiles like this:

rtemis@artemis4 ~/space-nerds-in-space $ make 0=1
./gather_build_info > build_info.h
snis_server.c: In function ‘put_client’:
snis_server.c:466:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=]
fprintf(stderr, "snis_server: calling remove_client %ld\n", client_index(c));
^
snis_server.c:468:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=]
fprintf(stderr, "snis_server: remove_client %ld returned\n", client_index(c));
^
snis_server.c: In function ‘update_multiverse’:
snis_server.c:16704:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘int’ [-Wformat=]
logprefix(), o->id, go_index(o), o->alive, FILE, LINE);
^
COMPILE snis_server.c
COMPILE snis_multiverse.c
COMPILE snis_client.c
cp snis_client.c snis_limited_client.c
COMPILE snis_limited_client.c
LINK snis_server
LINK snis_client
LINK snis_limited_client
LINK snis_multiverse

Oh... here is a core dump:

artemis@artemis4 /space-nerds-in-space $ sudo echo bt | gdb -c core ./snis_client
GNU gdb (Ubuntu 7.7.1-0ubuntu5
14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./snis_client...done.
[New LWP 3635]
[New LWP 3636]
[New LWP 3603]
[New LWP 3586]
[New LWP 3608]
[New LWP 3609]
[New LWP 3593]
[New LWP 3594]
[New LWP 3610]
[New LWP 3631]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Core was generated by `./bin/snis_client --fullscreen'.
Program terminated with signal SIGABRT, Aborted.
#0 0xb7777cb0 in ?? ()
(gdb) #0 0xb7777cb0 in ?? ()
#1 0xb6c4b85b in __GI___fortify_fail (msg=,
msg@entry=0xb6cb361b "stack smashing detected") at fortify_fail.c:37
#2 0xb6c4b7ea in __stack_chk_fail () at stack_chk_fail.c:28
#3 0x08096c2e in process_update_netstats () at snis_client.c:4761
#4 0x0809913a in gameserver_reader (arg=0x0) at snis_client.c:5657
---Type to continue, or q to quit---#5 0xb6d0ef70 in start_thread (arg=0xa34dcb40) at pthread_create.c:312
#6 0xb6c3bbee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129
(gdb) quit

Hmm, pthread_create.

@smcameron
Copy link
Owner Author

Might be fixed by cbda95e

@smcameron
Copy link
Owner Author

From the user who reported this, I find out that this does indeed fix the reported problem.

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

1 participant