Gentoo Archives: gentoo-user

From: john <jdm@×××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] USB Problems
Date: Sun, 12 Jun 2011 21:32:07
Message-Id: 20110612223030.2541a526@arcticwolf.myzen.co.uk
In Reply to: Re: [gentoo-user] USB Problems by meino.cramer@gmx.de
1 On Sun, 12 Jun 2011 21:20:48 +0200
2 meino.cramer@×××.de wrote:
3
4 > john <jdm@×××××××××××××××××××.uk> [11-06-12 20:52]:
5 > > On Sun, 12 Jun 2011 16:45:38 +0200
6 > > meino.cramer@×××.de wrote:
7 > >
8 > > > john <jdm@×××××××××××××××××××.uk> [11-06-12 16:36]:
9 > > > > Gents
10 > > > >
11 > > > > Whenever I insert external USB device my machine locks and I
12 > > > > have to do a hard reset (sys req does not even work). I have
13 > > > > tried this in a graphical environment and without. Machine
14 > > > > boots up fine with USB keyboard and mouse but will not boot up
15 > > > > with usb storage (memory stick
16 > > > > - tried several)
17 > > > >
18 > > > > I have recently upgrade kernel to 2.6.38-r6 when this error
19 > > > > started (approx). Hav also tried 2.6.38-r7 (which according to
20 > > > > bugzilla should fix an issue similar to this) the error still
21 > > > > happens.
22 > > > >
23 > > > > Any suggestions on kernel config options, debugging would be
24 > > > > appreciated. And how to trap full error message.
25 > > > >
26 > > > > Error message alongs these lines
27 > > > >
28 > > > > Kernel panic not syncing - fatal exception in iterrupt
29 > > > > ksoftirqd/1 Not tainted
30 > > > >
31 > > > >
32 > > > >
33 > > > >
34 > > > > --
35 > > > > --------------
36 > > > > --------------
37 > > > > John D Maunder
38 > > > > jdm@×××××××××××××××××××.uk
39 > > > >
40 > > >
41 > > > Hi John,
42 > > >
43 > > > may be this could help to track th eerror more closely:
44 > > > Recompile the kernel with CONFIG_USB_DEBUG set.
45 > > > If not already done, enable CONFIG_MAGIC_SYSRQ and
46 > > > read about the available commands in the according
47 > > > docs under /usr/src/linux/Documentation/.
48 > > > This is a overall life saver in many other cases too.
49 > > > But it may be a security hole also -- you can disable
50 > > > it in /proc/ later.
51 > > > If possible change /etc/fstab to mount the partition
52 > > > to which logging will go with the "sync" option so
53 > > > every log entry will go directly onto the bare metal
54 > > > instead of a RAM buffer.
55 > > >
56 > > > Reboot into console mode (no X).
57 > > > cd to the logging directory and
58 > > > do a tail -f onto the logfile in question
59 > > >
60 > > > Insert the "USB stick of death" ;) and
61 > > > see, whether you can see anything in the
62 > > > tailed log.
63 > > >
64 > > > If not do the magic sysrq dance to sync hds,
65 > > > remount readonly and finally reboot.
66 > > >
67 > > > Take a closer look into the resulting logs.
68 > > >
69 > > > Good luck!
70 > > >
71 > > > Nevertheless have a nice weekend!
72 > > > Best regards,
73 > > > mcc
74 > > >
75 > > >
76 > > >
77 > >
78 > > Thanks mmc,
79 > > CONFIG_MAGIC_SYSRQ and CONFIG_USB_DEBUG set to y
80 > >
81 > > When I plug in USB device SYSREQ does not work. I have tested when
82 > > system is normal and all ok with SYSREQ so USB device is locking up
83 > > system completely.
84 > >
85 > > I have put sync in mount table but when device is inserted error log
86 > > is not being produced (in /var/log/messages, etc). I may end up
87 > > having to take a photo of error log(lol). Or there maybe some other
88 > > way of catching error which Gentoo gurus may advise.
89 > >
90 > > I have tried 3 memory sticks and they all lock system up. These work
91 > > on another PC using Arch and work on this PC dual booting with
92 > > Windows. I have a usb hard drive which works ok so it is a memory
93 > > stick only issue!!!!????
94 > >
95 > > Hmmm.
96 > >
97 > > --
98 > > --------------
99 > > --------------
100 > > John D Maunder
101 > > jdm@×××××××××××××××××××.uk
102 > >
103 >
104 > Hi John,
105 >
106 > if sysreq does not work after inserting the usbstick then the kernel
107 > stops working completly (the sysreq-code of the kernel is not
108 > entered), which seems to be that something happening on very low
109 > level (the problem not the sysreq-code of course... ;)
110 >
111 > Just another shot into the dark:
112 > Do you have modularized all usb-related stuff? This also may help to
113 > let the usb-sticks work correctly.
114 >
115 > Ah! Another thing: Insert the related modules into
116 > /etc/conf.d/modules so that they get loaded in a very early
117 > phase of the bootprocess.
118 >
119 > With modules loaded and with no usb-sticks as root inspect the
120 > according modules with modinfo -p <modulename> to see, whether
121 > there a additional parameters you may pass to the modules to get
122 > an extra of informations or - better - to fix the issue.
123 >
124 > Modify under "Kernel hacking" in the kernel config the
125 > "Default message log level" to see more.
126 >
127 > Furthermore there is a switch "Kernel debugging" with sub-options.
128 > May be turning on these may also help to get closer to all evil ;)
129 >
130 > Last thing:
131 > If there is nothing valueable stored on the usbsticks:
132 > Try to reformat the usbsticks. Instead of putting a FAT32-fs on the
133 > bare device, create a regular partition and create a Linux-fs
134 > (reiserfs, ext2/3/4 or like that) on that partition.
135 >
136 > This may not be good idea in general, but - if it works - this would
137 > give a hint, where to search next.
138 >
139 > Good luck!
140 >
141 > Best regards,
142 > mcc
143 >
144 >
145 >
146 >
147 >
148 >
149 >
150 >
151 >
152
153 Thanks Meino,
154 Have recompliled USB as modules (ehci-hcd, ohci-hcd and usb-storage and
155 load with /etc/conf.d/modules but still locks ups. Hope these are the
156 right ones. I'll try scsi next.
157
158 Also tried fdisk Linux file system and format ext3. But all to no avail.
159 Still locking up.
160
161 Have configure kernel hacking options as suggested.
162
163 Error message as follows:-
164
165 --------------------------------------------------------
166 Bug: unable to handle kernel null pointer dereference at
167 0000000000000048
168
169 IP [<ffffffff811ddb8e>]elv_queue_empty+0x12/0x27
170
171 Oops 000 [#1] SMP
172
173 last sys file: /sys/devices/virtual/bdi/8:32/uevent
174
175 Pid: 1-, comm: ksoftirqd/1 Tainted: P 2.6.38-gentoo-r7 #4 MICRO-STAR
176 MS-7388
177
178 RIP 0010[<ffffffff811ddb8e7>] elv-queue_empty+0x12/0x27
179 --------------------------------------------------------
180
181
182 From my very limited knowledge, I would suspect kernel problem (ksoft)
183 and irq (software interrupt perhaps). Please put me right if I'm out of
184 order here. I'm Linux noobie
185
186
187 Think I'll drop back to an older kernel to see if I'm still getting the
188 issue as this may elliminate hardware issue.
189
190 Unsure how to pass options to modules when loading. is this just done
191 through /etc/conf.d/modules
192
193 I like the error messages though Oops, RIP (someone has a sense of
194 humour)
195
196
197 Thanks for you help
198
199 At least you learn while debgging
200
201
202 --
203 --------------
204 --------------
205 John D Maunder
206 jdm@×××××××××××××××××××.uk

Replies

Subject Author
Re: [gentoo-user] USB Problems Volker Armin Hemmann <volkerarmin@××××××××××.com>
Re: [gentoo-user] USB Problems meino.cramer@×××.de