Closed
Bug 43519
Opened 25 years ago
Closed 21 years ago
Classic NSPR: socket test asserts.
Categories
(NSPR :: NSPR, defect, P3)
Tracking
(Not tracked)
RESOLVED
WONTFIX
4.6
People
(Reporter: wtc, Assigned: wtc)
Details
NSPR 4.0
Classic NSPR
Red Hat Linux 6.0 or 6.1
The socket test asserts in UDP Client/Server test. Here is
some info from the debugger.
---------------------------------------
UDP Client/Server Test - IPv4/Ipv4
Assertion failure: IsValidNetAddr(addr) == PR_TRUE, at prsocket.c:677
Program received signal SIGABRT, Aborted.
0x4008e4e1 in __kill () from /lib/libc.so.6
(gdb) where
#0 0x4008e4e1 in __kill () from /lib/libc.so.6
#1 0x4008e156 in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2 0x4008f868 in abort () at ../sysdeps/generic/abort.c:88
#3 0x4002b560 in PR_Assert (s=0x40065280 "IsValidNetAddr(addr) == PR_TRUE",
file=0x40065240 "prsocket.c", ln=677) at prlog.c:448
#4 0x4004be0c in SocketSendTo (fd=0x8053c60, buf=0x8058000, amount=128,
flags=0, addr=0x50381de4, timeout=4294967295) at prsocket.c:677
#5 0x400282d3 in PR_SendTo (fd=0x8053c60, buf=0x8058000, amount=128, flags=0,
addr=0x50381de4, timeout=4294967295) at priometh.c:223
#6 0x804a199 in UDP_Server (arg=0x8053c40) at socket.c:581
#7 0x400521ce in _PR_UserRunThread () at pruthr.c:489
(gdb) f 4
#4 0x4004be0c in SocketSendTo (fd=0x8053c60, buf=0x8058000, amount=128,
flags=0, addr=0x50381de4, timeout=4294967295) at prsocket.c:677
677 PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE);
(gdb) print *addr
$1 = {raw = {family = 0, data = '\000' <repeats 13 times>}, inet = {
family = 0, port = 0, ip = 0, pad = "\000\000\000\000\000\000\000"},
ipv6 = {family = 0, port = 0, flowinfo = 0, ip = {_S6_un = {
_S6_u8 = '\000' <repeats 15 times>, _S6_u16 = {0, 0, 0, 0, 0, 0, 0,
0}, _S6_u32 = {0, 0, 0, 0}, _S6_u64 = {0, 0}}}, scope_id = 0},
local = {family = 0, path = '\000' <repeats 103 times>}}
(gdb)
---------------------------------------------
The 'addr' was just stored by a prior PR_RecvFrom call.
This is a Linux-only problem and only happens with classic NSPR.
| Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
The problem here is that accept(2) cannot necessarily provide valid
a valid sockaddr if the connection is closed before the accept.
On NetBSD and FreeBSD, they decided to return a valid descriptor to avoid
race conditions when doing a select on the descriptor.
I think NetBSD returns garbage in the sockaddr, and in new releases of
FreeBSD I think they decided to set the sockaddr_len to 0 to signal
that the data is not valid. Unfortunately, that will still cause
the assertion to fail in NSPR
| Assignee | ||
Comment 2•25 years ago
|
||
castor@geocast.com:
Were you commenting on this bug? This bug is
about an assertion failure in one of our UDP
test, which does not use accept().
| Assignee | ||
Comment 4•25 years ago
|
||
This bug has nothing to do with the classic Skin/Theme
of Mozilla.
Keywords: classic
| Assignee | ||
Updated•25 years ago
|
Target Milestone: --- → Future
Hey Wan-Teh,
Does this only occur with Red Hat?
(Was this tried with a more recent version?)
| Assignee | ||
Comment 6•21 years ago
|
||
Marked the bug WONTFIX. On current and future Linux
releases we will only use the pthreads version of NSPR.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → WONTFIX
Target Milestone: Future → 4.6
You need to log in
before you can comment on or make changes to this bug.
Description
•