SAR patch and segfaults
"Matias Lahti" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <032801c28b3a$c09d8d30$f65241c1@surma> |
Hi - the SAR patch applied to CVS works nice with smaller files, but with
bigger files it segfaults.
Here's the log of wapbox before it dies:
---
2002-11-13 19:21:21 [1] DEBUG: User-Agent: Nokia7650/1.0 SymbianOS/6.1
Series60/0.9
2002-11-13 19:21:21 [1] DEBUG: WSP: End of decoded headers.
2002-11-13 19:21:21 [1] DEBUG: WSP 1: New state CONNECTING
2002-11-13 19:21:21 [6] DEBUG: WTP 2: New state INVOKE_RESP_WAIT
2002-11-13 19:21:21 [6] DEBUG: WTP: resp_machine 2, state INVOKE_RESP_WAIT,
event TR-Invoke.res.
2002-11-13 19:21:21 [6] DEBUG: WTP 2: New state RESULT_WAIT
2002-11-13 19:21:21 [1] DEBUG: WSP: machine 0x80cfc58, state CONNECTING,
event S-Connect.res
2002-11-13 19:21:21 [1] DEBUG: WSP 1: New state CONNECTING_2
2002-11-13 19:21:21 [6] DEBUG: WTP: resp_machine 2, state RESULT_WAIT, event
TR-Result.req.
2002-11-13 19:21:21 [6] DEBUG: WTP: begin_sar_result(): data len = 23
2002-11-13 19:21:21 [6] DEBUG: WTP: dispath_to_wdp(): psn = 0
2002-11-13 19:21:21 [6] DEBUG: WTP 2: New state RESULT_RESP_WAIT
2002-11-13 19:21:22 [6] DEBUG: WTP: resp_machine 2, state RESULT_RESP_WAIT,
event RcvAck.
2002-11-13 19:21:22 [1] DEBUG: WSP: machine 0x80cfc58, state CONNECTING_2,
event TR-Result.cnf
2002-11-13 19:21:22 [1] DEBUG: WSP 1: New state CONNECTED
2002-11-13 19:21:22 [6] DEBUG: WTP 2: New state LISTEN
2002-11-13 19:21:22 [6] DEBUG: WTP: Destroying WTPRespMachine 0x80d0b50 (2)
2002-11-13 19:21:23 [6] DEBUG: WTP: Created WTPRespMachine 0x80d0cb0 (3)
2002-11-13 19:21:23 [6] DEBUG: SAR event received, wait for continue
2002-11-13 19:21:24 [6] DEBUG: SAR event received, wait for continue
2002-11-13 19:21:25 [6] DEBUG: SAR event received, wait for continue
2002-11-13 19:21:25 [4] DEBUG: Timeout-R elapsed.
2002-11-13 19:21:25 [6] DEBUG: WTP: resp_machine 1, state RESULT_RESP_WAIT,
event Timeout-R.
2002-11-13 19:21:25 [6] DEBUG: WTP 1: New state RESULT_RESP_WAIT
2002-11-13 19:21:25 [6] DEBUG: SAR event received, wait for continue
---
strace log:
---
2940 --- SIGRTMIN (Real-time signal 0) ---
2940 <... rt_sigsuspend resumed> ) = -1 EINTR (Interrupted system call)
2940 sigreturn() = ? (mask now [HUP INT QUIT TERM
RTMIN])
2940 time([1037208085]) = 1037208085
2940 write(2, "2002-11-13 19:21:25 [6] DEBUG: S"..., 69) = 69 *** here
are the last log messages
2940 write(5, "2002-11-13 19:21:25 [6] DEBUG: S"..., 69) = 69
2940 time(NULL) = 1037208085
2940 rt_sigprocmask(SIG_SETMASK, NULL, [HUP INT QUIT TERM RTMIN], 8) = 0
2940 rt_sigsuspend([HUP INT QUIT TERM] <unfinished ...>
2934 <... poll resumed> [{fd=7, events=POLLIN}], 1, 2000) = 0
2934 getppid() = 2933
2934 poll( <unfinished ...>
2933 <... poll resumed> [{fd=3, events=POLLIN}, {fd=38, events=POLLIN,
revents=POLLIN}], 2, -1) = 1
2933 read(38, "\0\0\5\205\0\0\0\4\0\0\0\r213.161.41.93\0\0\22\327\0\0"...,
4096) = 1417
2933 brk(0x80e2000) = 0x80e2000
2933 kill(2940, SIGRTMIN) = 0
2933 read(38, 0xbfffe82c, 4096) = -1 EAGAIN (Resource temporarily
unavailable)
2933 poll( <unfinished ...>
2940 --- SIGRTMIN (Real-time signal 0) ---
2940 <... rt_sigsuspend resumed> ) = -1 EINTR (Interrupted system call)
2940 sigreturn() = ? (mask now [HUP INT QUIT TERM
RTMIN])
2940 write(38, "\0\0\0001\0\0\0\4\0\0\0\0070.0.0.0\0\0#\361\0\0\0\r213"...,
53) = 53
2940 --- SIGSEGV (Segmentation fault) --- **** this seems to
be the point of the crash?
2934 <... poll resumed> [{fd=7, events=POLLIN}], 1, 2000) = -1 EINTR
(Interrupted system call)
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 getppid() = 2933
2934 wait4(-1, [WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV],
WNOHANG|__WCLONE, NULL) = 2940
2934 munmap(0xbec00000, 2097152) = 0
2934 kill(2950, SIGSEGV) = 0
2934 kill(2948, SIGSEGV) = 0
2948 --- SIGSEGV (Segmentation fault) ---
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 kill(2947, SIGSEGV) = 0
2947 --- SIGSEGV (Segmentation fault) ---
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 kill(2946, SIGSEGV) = 0
2946 --- SIGSEGV (Segmentation fault) ---
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 kill(2945, SIGSEGV) = 0
2945 <... poll resumed> [{fd=30, events=POLLIN}, {fd=27, events=POLLIN}],
2, -1) = -1 EINTR (Interr
upted system call)
2945 --- SIGSEGV (Segmentation fault) ---
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 kill(2944, SIGSEGV) = 0
2944 <... poll resumed> [{fd=28, events=POLLIN}], 1, -1) = -1 EINTR
(Interrupted system call)
2944 --- SIGSEGV (Segmentation fault) ---
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 kill(2943, SIGSEGV) = 0
2943 --- SIGSEGV (Segmentation fault) ---
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 kill(2942, SIGSEGV) = 0
2942 --- SIGSEGV (Segmentation fault) ---
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 kill(2941, SIGSEGV) = 0
2941 --- SIGSEGV (Segmentation fault) ---
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 kill(2939, SIGSEGV) = 0
2939 --- SIGSEGV (Segmentation fault) ---
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 kill(2938, SIGSEGV <unfinished ...>
2938 <... poll resumed> [{fd=15, events=POLLIN}], 1, 7000) = -1 EINTR
(Interrupted system call)
2934 <... kill resumed> ) = 0
2938 --- SIGSEGV (Segmentation fault) ---
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 kill(2937, SIGSEGV <unfinished ...>
2937 --- SIGSEGV (Segmentation fault) ---
2934 <... kill resumed> ) = 0
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 kill(2936, SIGSEGV <unfinished ...>
2936 --- SIGSEGV (Segmentation fault) ---
2934 <... kill resumed> ) = 0
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 kill(2935, SIGSEGV) = 0
2935 --- SIGSEGV (Segmentation fault) ---
2934 --- SIGRT_1 (Real-time signal 1) ---
2934 sigreturn() = ? (mask now ~[TRAP KILL STOP])
2934 kill(2933, SIGSEGV) = 0
2933 <... poll resumed> [{fd=3, events=POLLIN}, {fd=38, events=POLLIN}],
2, -1) = -1 EINTR (Interru
pted system call)
2933 --- SIGSEGV (Segmentation fault) ---
2933 +++ killed by SIGSEGV +++
2934 _exit(0) = ?
2950 <... poll resumed> [{fd=39, events=POLLIN}], 1, 30000) = -1 EINTR
(Interrupted system call)
2950 --- SIGSEGV (Segmentation fault) ---
----
gdb stacktrace:
#0 0x080d02e0 in ?? ()
#1 0x080d1008 in ?? ()
Cannot access memory at address 0x36
Hopefully someone can get something out of these - I know I can't...
- Matias Lahti