2011-02-25 04:57:31 USB issue? Streaming data over USB Modem
Richard Aldrich (UNITED KINGDOM)
Message: 98438
Hi. I am using a USB modem using a modified option.c driver.
I am running PPPD and all is working fine most of the time. I am stream data to a server over a HSPA+ connection, and getting good speeds.
Howver, after a while of streaming, my program crashes a prints the following. It looks to me like a bug in the usb, but I wondered if someone could confirm what the log means.
Any help much appreciated.
- Richard.
LOG::
Data access misaligned address violation
<5> - Attempted misaligned data memory or data cache access.
Kernel OOPS in progress
Deferred Exception context
CURRENT PROCESS:
COMM=ksoftirqd/0 PID=3 CPU=0
invalid mm
return address: [0x00131d26]; contents of:
0x00131d00: 0025 5008 e620 0016 6200 5482 0c02 1c07
0x00131d10: e14a 001d e10a 39a0 9110 0040 0000 e51d
0x00131d20: 001e e560 00a6 [9728] e560 00a0 b468 a138
0x00131d30: c604 4000 c681 83c0 c681 8040 5608 b068
ADSP-BF537-0.2 500(MHz CCLK) 100(MHz SCLK) (mpu off)
Linux version 2.6.34.7-ADI-2010R1 (root@linux-fqgd) (gcc version 4.3.5 (ADI-2010R1-RC4) ) #59 Tue Feb 8 10:09:48 GMT 2011
SEQUENCER STATUS: Not tainted
SEQSTAT: 00000024 IPEND: 8008 IMASK: ffff SYSCFG: 0006
EXCAUSE : 0x24
physical IVG3 asserted : <0xffa007d8> { _trap + 0x0 }
physical IVG15 asserted : <0xffa010bc> { _evt_system_call + 0x0 }
logical irq 6 mapped : <0xffa003ec> { _bfin_coretmr_interrupt + 0x0 }
logical irq 10 mapped : <0x000fcc9c> { _bfin_rtc_interrupt + 0x0 }
logical irq 18 mapped : <0x000a9e88> { _bfin_serial_dma_rx_int + 0x0 }
logical irq 19 mapped : <0x000a9be0> { _bfin_serial_dma_tx_int + 0x0 }
logical irq 24 mapped : <0x000d097c> { _bfin_mac_interrupt + 0x0 }
logical irq 54 mapped : <0x000da198> { _usb_hcd_irq + 0x0 }
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x01023ccc> /* kernel dynamic memory (maybe user-space) */
RETX: <0x00000480> /* Maybe fixed code section */
RETS: <0x00131cd2> { _tcp_transmit_skb + 0xca }
PC : <0x00131d26> { _tcp_transmit_skb + 0x11e }
DCPLB_FAULT_ADDR: <0x01a662fe> /* kernel dynamic memory (maybe user-space) */
ICPLB_FAULT_ADDR: <0x00131d26> { _tcp_transmit_skb + 0x11e }
PROCESSOR STATE:
R0 : 00004f89 R1 : 000003a1 R2 : 0000ffc0 R3 : 00000000
R4 : 93b48960 R5 : 01023cdc R6 : 00000020 R7 : 00000001
P0 : 008a2060 P1 : 01a67558 P2 : 001d39a0 P3 : 01a67540
P4 : 008a2060 P5 : 01a662ff FP : 01a67558 SP : 01023bf0
LB0: ffa0179c LT0: ffa0179a LC0: 00000000
LB1: 00102482 LT1: 00102482 LC1: 00000000
B0 : 0f000000 L0 : 00000000 M0 : 00000008 I0 : 01a674e8
B1 : 00000000 L1 : 00000000 M1 : 00000000 I1 : 001d09a8
B2 : 00000000 L2 : 00000000 M2 : 00000000 I2 : ffffffff
B3 : 00000000 L3 : 00000000 M3 : 00000000 I3 : 01a490aa
A0.w: 001f76d3 A0.x: 00000000 A1.w: 000006d3 A1.x: 00000000
USP : 00000000 ASTAT: 02003004
Hardware Trace:
0 Target : <0x00003eec> { _trap_c + 0x0 }
Source : <0xffa0076c> { _exception_to_level5 + 0xa4 } CALL pcrel
1 Target : <0xffa006c8> { _exception_to_level5 + 0x0 }
Source : <0xffa0057c> { _bfin_return_from_exception + 0x20 } RTX
2 Target : <0xffa0055c> { _bfin_return_from_exception + 0x0 }
Source : <0xffa00620> { _ex_trap_c + 0x74 } JUMP.S
3 Target : <0xffa005ac> { _ex_trap_c + 0x0 }
Source : <0xffa00840> { _trap + 0x68 } JUMP (P4)
4 Target : <0xffa007f6> { _trap + 0x1e }
Source : <0xffa007f2> { _trap + 0x1a } IF CC JUMP pcrel
5 Target : <0xffa007d8> { _trap + 0x0 }
FAULT : <0x00131d26> { _tcp_transmit_skb + 0x11e } W[P5] = R0 (Z)
Source : <0x00131d22> { _tcp_transmit_skb + 0x11a } R0 = W[P4 + -0x18](X)
6 Target : <0x00131ce6> { _tcp_transmit_skb + 0xde }
Source : <0x00131ce0> { _tcp_transmit_skb + 0xd8 } IF CC JUMP pcrel
7 Target : <0x00131cd2> { _tcp_transmit_skb + 0xca }
Source : <0x00103452> { _skb_push + 0x2e } RTS
8 Target : <0x00103424> { _skb_push + 0x0 }
Source : <0x00131cce> { _tcp_transmit_skb + 0xc6 } CALL pcrel
9 Target : <0x00131cca> { _tcp_transmit_skb + 0xc2 }
Source : <0x00131cb8> { _tcp_transmit_skb + 0xb0 } IF !CC JUMP pcrel (BP)
10 Target : <0x00131c9e> { _tcp_transmit_skb + 0x96 }
Source : <0x00131296> { _tcp_established_options + 0x4e } RTS
11 Target : <0x00131248> { _tcp_established_options + 0x0 }
Source : <0x00131c9a> { _tcp_transmit_skb + 0x92 } JUMP.L
12 Target : <0x00131c8e> { _tcp_transmit_skb + 0x86 }
Source : <0x00131c8a> { _tcp_transmit_skb + 0x82 } IF CC JUMP pcrel (BP)
13 Target : <0x00131c70> { _tcp_transmit_skb + 0x68 }
Source : <0x00131c6c> { _tcp_transmit_skb + 0x64 } IF !CC JUMP pcrel (BP)
14 Target : <0x00131c68> { _tcp_transmit_skb + 0x60 }
Source : <0x00102640> { ___skb_clone + 0xbc } RTS
15 Target : <0x0010259c> { ___skb_clone + 0x18 }
Source : <0x00102506> { ___copy_skb_header + 0xea } RTS
Kernel Stack
Stack info:
SP: [0x01023f3c] <0x01023f3c> /* kernel dynamic memory (maybe user-space) */
Memory from 0x01023f30 to 01024000
01023f30:<00015c0a> 00000003 001cacd4 [01022000] 00000001 0000000c 00000100 00000009
01023f50: ffa01eaa 00000000 01018600 001d2460 04000000 00000000 00000000 00015cf6
01023f70: 001cacc0 01022000 01022000 0000ffff 00000000 00000001 00000000 01022000
01023f90: 00000001 00000000 00015d56 00000001 01022000 00000000 0002118e <0002119e>
01023fb0: 0101bf58 00015d00 00000000 00000000 00000000 00000000 00000000 00021144
01023fd0: 000014a8 00000000 00000000 01023fdc 01023fdc <000014ae> 00000000 00000000
01023ff0: 00000000 00000000 ffffffff 00000006
Return addresses in stack:
address : <0x00015c0a> { ___do_softirq + 0x76 }
address : <0x0002119e> { _kthread + 0x5a }
address : <0x000014ae> { _kernel_thread_helper + 0x6 }
Modules linked in:
Kernel panic - not syncing: Kernel exception
Hardware Trace:
Stack info:
SP: [0x01023b14] <0x01023b14> /* kernel dynamic memory (maybe user-space) */
Memory from 0x01023b10 to 01024000
01023b10: 00000013 [00184f90] 0014ed82 01023bf0 00184f90 001c63ce 001c63ce 001c63ce
01023b30: 01023b44 00004324 01023bf0 00008008 01023bf0 0000003f 0000003f 01023d28
01023b50: 0015adf8 00030001 001db3e4 ffa00cd6 <000cb25e> 003276e0 008ffda0 01926190
01023b70: 000e6e16 01a456e0 000cb6b4 003276e0 008ffda0 000cb6b4 00384000 01ad3f50
01023b90: 0010ad10 0010ab6c 0000000c 02003024 0009b9ce 000cbdb4 003276e0 00000000
01023bb0: 00327400 003276e4 <000cbe0e> 003276e4 0000001e 000cbecc 000016d0 ffa00770
01023bd0: 001c3000 00008008 00000024 01023cdc 93b48960 008a2060 01023c08 00000480
01023bf0: 00000480 00008008 00000024 00000000 01023ccc 00000480 00131d26 00131cd2
01023c10: 00004f89 02003004 00102482 ffa0179c 00102482 ffa0179a 00000000 00000000
01023c30: 000006d3 00000000 001f76d3 00000000 00000000 00000000 00000000 0f000000
01023c50: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000008
01023c70: 01a490aa ffffffff 001d09a8 01a674e8 00000000 01a67558 01a662ff 008a2060
01023c90: 01a67540 001d39a0 01a67558 008a2060 00000001 00000020 01023cdc 93b48960
01023cb0: 00000000 0000ffc0 000003a1 00004f89 00004f89 008a2060 00000006 00000000
01023cd0: 00000001 00000000 01023cf0 00000002 00000000 001fb621 0001aca2 00000000
01023cf0: 00000000 01a5be80 00133958 008a2060 01a674b8 01a674a0 fffffd9f 00000002
01023d10: 008a20d0 93b48960 008a2060 001d5b1c 00000000 00000020 008a20d0 00133c48
01023d30: 01a674a0 008a2060 0000002e 00000004 00000000 00000000 00000001 ffffffff
01023d50: 008a20f8 008a2234 93b486ff 0012f7ba 008a2060 001d5b1c 00336760 000003a0
01023d70: 00000009 00000000 93b486ff 008a2060 00000000 93b486ff 0000002c 00000000
01023d90: 00000000 00000000 00000000 00000009 01023dd4 001305e4 008a2060 00336760
01023db0: 01a90038 0000002c 00000006 701a820a 01a90024 001d4d68 00102ad0 0000002c
01023dd0: 00000001 01023e10 001364dc 00336760 00336760 008a2060 0000894f 00000006
01023df0: 00336760 001d0ef8 001d0b1c 0000002c 4792986d 00000000 001368f2 0011514c
01023e10: 008a2060 00136aa8 00336760 01a90038 001d0b1c 0000894f 019200c0 01926000
01023e30: 01911b40 0000b204 701a820a 0000894f 00000006 01926000 01023ea4 <0011f67a>
01023e50: 00336760 001d0ef8 001d0b1c 00000006 00000008 001d0b1c 0000003f 0011f39e
01023e70: 01a90024 00336760 001d0b1c <0011f2a2> 01a90024 00336760 00000000 01927000
01023e90: 003bb800 001d39a0 00000000 00327400 0000003f 00327400 <00109d76> 001d0afc
01023eb0: 00336760 001d0b1c 00000000 0000003f 01a48014 01a48000 00327400 001d39a0
01023ed0: 00109e98 001deb64 001deb60 001d5b1c 00000000 00000000 001fb621 00000040
01023ef0: 000ce048 00336760 01a48064 001deb70 <0010a042> 001deb7c 001deb60 001d39a0
01023f10: 00000040 0000000c 0000012c 001fb623 001deb7c <0000aa10> 01018600 001cacc0
01023f30:<00015c0a> 00000003 001cacd4 01022000 00000001 0000000c 00000100 00000009
01023f50: ffa01eaa 00000000 01018600 001d2460 04000000 00000000 00000000 00015cf6
01023f70: 001cacc0 01022000 01022000 0000ffff 00000000 00000001 00000000 01022000
01023f90: 00000001 00000000 00015d56 00000001 01022000 00000000 0002118e <0002119e>
01023fb0: 0101bf58 00015d00 00000000 00000000 00000000 00000000 00000000 00021144
01023fd0: 000014a8 00000000 00000000 01023fdc 01023fdc <000014ae> 00000000 00000000
01023ff0: 00000000 00000000 ffffffff 00000006
Return addresses in stack:
address : <0x000cb25e> { _ppp_push + 0x42 }
address : <0x000cbe0e> { _ppp_xmit_process + 0x92 }
address : <0x0011f67a> { _ip_local_deliver + 0x5e }
address : <0x0011f2a2> { _ip_rcv_finish + 0x122 }
address : <0x00109d76> { _netif_receive_skb + 0x1b6 }
address : <0x0010a042> { _net_rx_action + 0x86 }
address : <0x0000aa10> { _dequeue_task + 0x6c }
address : <0x00015c0a> { ___do_softirq + 0x76 }
address : <0x0002119e> { _kthread + 0x5a }
address : <0x000014ae> { _kernel_thread_helper + 0x6 }
QuoteReplyEditDelete
2011-02-27 22:02:52 Re: USB issue? Streaming data over USB Modem
Sonic Zhang (CHINA)
Message: 98458
Which kernel and uClinux-dist release do you use?
QuoteReplyEditDelete
2011-02-28 11:33:40 Re: USB issue? Streaming data over USB Modem
Mike Frysinger (UNITED STATES)
Message: 98476
his crash message indicates the kernel version: 2010R1. we can only assume the toolchain/uclinux-dist match ...
but i'm not sure that it matters. we've seen unaligned issues in the past in the TCP networking stack.
Richard: please translate the crash offsets to files/line numbers. only you can do this since you have the binary which matches the crash. look at how objdump/addr2line are used here:
docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:analyzing_traces
QuoteReplyEditDelete
2011-03-01 08:04:24 Re: USB issue? Streaming data over USB Modem
Richard Aldrich (UNITED KINGDOM)
Message: 98505
Hi Mike,
Thanks for response. I will have a look at the doc on analyzing traces.
Yes I am using matching toolchain and uclinux dist. (2010R1) It's a recent release which I upgraded to for the improved USB support.
Looking at the trace:
PC : <0x00131d26> { _tcp_transmit_skb + 0x11e }
Is that where I should be looking?
That function is not in my user application, infact I can't find any reference to my application level in that trace. I presume it is because the send method i use would pass the control to the PPPD application which then buffers the data over the USB?
BTW, I haven't managed to repeat the issue when testing over Ethernet.
QuoteReplyEditDelete
2011-03-01 12:49:55 Re: USB issue? Streaming data over USB Modem
Mike Frysinger (UNITED STATES)
Message: 98508
look at the trace for where it says FAULT. that is where it falls down.
it could be that the USB device you're using doesnt make sure its packets are aligned before sending up to higher levels. what device are you using exactly ?
QuoteReplyEditDelete