Issue information

Issue ID
#5224
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Jan 8, 2012 21:20
Last Post
Hercules Elf Bot
Apr 19, 2012 15:31
Confirmation
Yes (2)
No (1)

Hercules Elf Bot - Jan 8, 2012 21:20

Originally posted by [b]GreenBox[/b]
Some servers using rAthena are receiving SIGPIPE randomly.
Adding MSG_NOSIGNAL for linux based systems on send calls fix this bug.

GDB output:

[code]Program received signal SIGPIPE, Broken pipe.
0x00ab27f2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) bt
#0 0x00ab27f2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x00ba44a1 in send () from /lib/libc.so.6
#2 0x08164ebb in send_from_fifo (fd=60) at socket.c:343
#3 0x08163dbb in do_close (fd=60) at socket.c:1127
#4 0x08088106 in clif_parse (fd=60) at clif.c:14808
#5 0x08163898 in send_shortlist_do_sends () at socket.c:1404
#6 0x08164d15 in do_sockets (next=50) at socket.c:745
#7 0x08163505 in main (argc=1, argv=0xbfffd874) at core.c:268[/code]

Hercules Elf Bot - Jan 8, 2012 21:45

Originally posted by [b]xazax[/b]
Maybe it would be better to catch SIGPIPE and close the connection than just ignoring it ( at least print some kind of message with debug data, which would help us to find out what the real problem is) ? I'm not experienced in this topic though.

Hercules Elf Bot - Jan 9, 2012 1:59

Originally posted by [b]GreenBox[/b]
It seems to be ignored when the emulator is running without GDB, anw this flag will increase GDB stability when debugging cuz it will not generate SIGPIPE when writing to a disconnected client and then we can get the real bug.

Hercules Elf Bot - Jan 9, 2012 22:51

Originally posted by [b]Gepard[/b]
SIGPIPE is ignored anyway (in sig_proc you can see that only action taken is setting eof on the broken socket in socket.c), so we don't need it.

Anyway, should be fixed for linux in [rev=15415].

Hercules Elf Bot - Jan 9, 2012 22:58

Originally posted by [b]Roberto[/b]
I could reproduce this error:

[code]

Program received signal SIGPIPE, Broken pipe.
0x00ab27f2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2

(gdb) bt full
#0 0x00ab27f2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
No symbol table info available.
#1 0x00ba44a1 in send () from /lib/libc.so.6
No symbol table info available.
#2 0x0817c3eb in send_from_fifo (fd=30) at socket.c:336
len = <value optimized out>
#3 0x0817b3f2 in do_close (fd=30) at socket.c:1111
No locals.
#4 0x08086106 in clif_parse (fd=30) at clif.c:14383
cmd = 30
packet_ver = 29
packet_len = 34
err = -1073752360
sd = 0xf05d468
pnum = 0
[/code]

Thanks for this fix.