LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 07-21-2009, 10:13 AM   #1
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
usb-storage + usb card-reader = klogd spamming logs


This is a stock install of Slack64-current, except for a 2.6.30 kernel.

Anyone else have/had the klogd daemon cause the HDD light to stay on? I don't think there's any actual writing going on, and the light stays on right from when klogd starts (init script) until forever, unless I kill klogd.

Sasha

UPDATE: I changed the thread title due to new information in posts further down.

Last edited by GrapefruiTgirl; 07-22-2009 at 09:27 PM. Reason: Change thread title
 
Old 07-22-2009, 07:21 PM   #2
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,385

Rep: Reputation: 181Reputation: 181
Yep - I've had the same issue, but I don't yet know why. I could not even tell you that klogd is the problem - only that the hdd is spinning up and down constantly for no apparent reason. I'll have to check the next time it happens.
 
Old 07-22-2009, 08:31 PM   #3
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
It's been a while since I compiled 2.6.30 kernel but I seem to remember there were some different options regarding ide/sata/scsi or maybe ahci/apci. I can't point you to any specifics but you might want to review those choices. Does dmesg, lspci, lsmod tell you anything useful?

Maybe try to create initrd.gz and boot up 2.6.29.6 (slackware generic) and see which modules load. Look also at the i2c. Hope these suggestions are useful and not too basic.
 
Old 07-22-2009, 09:24 PM   #4
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
usb-storage driver & usb card-reader spamming kernel log, HDD runs forever

It's looking like klogd is just doing its job:

the source of the problem appears to lie in/about the kernel's usb-storage driver, which is spamming the kernel.log once per second with crap produced seemingly by non-stop querying of my usb-connected card reader.

Example:

Code:
---snip---                                                                                                                 
Jul 22 22:12:38 reactor kernel: usb-storage: *** thread sleeping.                                                                                                                      
Jul 22 22:12:38 reactor kernel: usb-storage: queuecommand called                                                                                                                       
Jul 22 22:12:38 reactor kernel: usb-storage: *** thread awakened.                                                                                                                      
Jul 22 22:12:38 reactor kernel: usb-storage: Command TEST_UNIT_READY (6 bytes)                                                                                                         
Jul 22 22:12:38 reactor kernel: usb-storage:  00 00 00 00 00 00                                                                                                                        
Jul 22 22:12:38 reactor kernel: usb-storage: Bulk Command S 0x43425355 T 0x1867 L 0 F 0 Trg 0 LUN 2 CL 6                                                                               
Jul 22 22:12:38 reactor kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes                                                                                                 
Jul 22 22:12:38 reactor kernel: usb-storage: Status code 0; transferred 31/31                                                                                                          
Jul 22 22:12:38 reactor kernel: usb-storage: -- transfer complete                                                                                                                      
Jul 22 22:12:38 reactor kernel: usb-storage: Bulk command transfer result=0                                                                                                            
Jul 22 22:12:38 reactor kernel: usb-storage: Attempting to get CSW...                                                                                                                  
Jul 22 22:12:38 reactor kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes                                                                                                 
Jul 22 22:12:39 reactor kernel: usb-storage: Status code 0; transferred 13/13                                                                                                          
Jul 22 22:12:39 reactor kernel: usb-storage: -- transfer complete                                                                                                                      
Jul 22 22:12:39 reactor kernel: usb-storage: Bulk status result = 0                                                                                                                    
Jul 22 22:12:39 reactor kernel: usb-storage: Bulk Status S 0x53425355 T 0x1867 R 0 Stat 0x1                                                                                            
Jul 22 22:12:39 reactor kernel: usb-storage: -- transport indicates command failure                                                                                                    
Jul 22 22:12:39 reactor kernel: usb-storage: Issuing auto-REQUEST_SENSE                                                                                                                
Jul 22 22:12:39 reactor kernel: usb-storage: Bulk Command S 0x43425355 T 0x1868 L 18 F 128 Trg 0 LUN 2 CL 6                                                                            
Jul 22 22:12:39 reactor kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes                                                                                                 
Jul 22 22:12:39 reactor kernel: usb-storage: Status code 0; transferred 31/31                                                                                                          
Jul 22 22:12:39 reactor kernel: usb-storage: -- transfer complete                                                                                                                      
Jul 22 22:12:39 reactor kernel: usb-storage: Bulk command transfer result=0                                                                                                            
Jul 22 22:12:39 reactor kernel: usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries                                                                                   
Jul 22 22:12:39 reactor kernel: usb-storage: Status code 0; transferred 18/18                                                                                                          
Jul 22 22:12:39 reactor kernel: usb-storage: -- transfer complete                                                                                                                      
Jul 22 22:12:39 reactor kernel: usb-storage: Bulk data transfer result 0x0                                                                                                             
Jul 22 22:12:39 reactor kernel: usb-storage: Attempting to get CSW...                                                                                                                  
Jul 22 22:12:39 reactor kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes                                                                                                 
Jul 22 22:12:40 reactor kernel: usb-storage: Status code 0; transferred 13/13                                                                                                          
Jul 22 22:12:40 reactor kernel: usb-storage: -- transfer corred 31/31                                                                                                                  
Jul 22 22:12:40 reactor kernel: usb-storage: -- transfer complete                                                                                                                      
Jul 22 22:12:40 reactor kernel: usb-storage: Bulk command transfer result=0                                                                                                            
Jul 22 22:12:40 reactor kernel: usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries                                                                                   
Jul 22 22:12:40 reactor kernel: usb-storage: Status code 0; transferred 18/18                                                                                                          
Jul 22 22:12:40 reactor kernel: usb-storage: -- transfer complete                                                                                                                      
Jul 22 22:12:40 reactor kernel: usb-storage: Bulk data transfer result 0x0                                                                                                             
Jul 22 22:12:40 reactor kernel: usb-storage: Attempting to get CSW...                                                                                                                  
Jul 22 22:12:40 reactor kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes                                                                                                 
Jul 22 22:12:40 reactor kernel: usb-storage: Status code 0; transferred 13/13                                                                                                          
Jul 22 22:12:40 reactor kernel: usb-storage: -- transfer complete                                                                                                                      
Jul 22 22:12:40 reactor kernel: usb-storage: Bulk status result = 0                                                                                                                    
Jul 22 22:12:40 reactor kernel: usb-storage: Bulk Status S 0x53425355 T 0x1894 R 0 Stat 0x0                                                                                            
Jul 22 22:12:40 reactor kernel: usb-storage: -- Result from auto-sense is 0                                                                                                            
Jul 22 22:12:40 reactor kernel: usb-storage: -- code: 0xf0, key: 0x2, ASC: 0x3a, ASCQ: 0x0                                                                                             
Jul 22 22:12:40 reactor kernel: usb-storage: (Unknown Key): (unknown ASC/ASCQ)                                                                                                         
Jul 22 22:12:40 reactor kernel: usb-storage: scsi cmd done, result=0x2                                                                                                                 
Jul 22 22:12:40 reactor kernel: usb-storage: *** thread sleeping.                                                                                                                      
Jul 22 22:12:41 reactor kernel: usb-storage: queuecommand called                                                                                                                       
Jul 22 22:12:41 reactor kernel: usb-storage: *** thread awakened.                                                                                                                      
Jul 22 22:12:41 reactor kernel: usb-storage: Command TEST_UNIT_READY (6 bytes)                                                                                                         
---snip---
I watched a tail -f /var/log/kernel for a few moments; this goes on forever, non-stop.

Note to self: look into this 'queuecommand' thing.

Any input appreciated, but meanwhile I'll be revisiting the kernel config just to be sure it isn't something I've put in there (don't think to -- I use basically the same kernel config on my 32bit Slack -- but who knows, there are *some* differences.)

Oh, and the card reader, is not being used -- it's empty all this time.


Sasha
 
Old 07-23-2009, 05:25 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,666
Blog Entries: 54

Rep: Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952
Moved: This thread is more suitable in the Linux Kernel forum and has been moved on your request to help your thread/question get the exposure it deserves.
 
Old 07-24-2009, 07:26 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,666
Blog Entries: 54

Rep: Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952
Quote:
Originally Posted by GrapefruiTgirl View Post
I'll be revisiting the kernel config just to be sure it isn't something I've put in there (don't think to -- I use basically the same kernel config on my 32bit Slack -- but who knows, there are *some* differences.) Oh, and the card reader, is not being used -- it's empty all this time.
Check your kernel config for CONFIG_USB_DEBUG=y or CONFIG_USB_STORAGE_DEBUG=y ?
 
Old 07-27-2009, 10:05 AM   #7
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 602

Rep: Reputation: 49
Not really fixing the source of the problem but rather the symptoms but might help anyway:

You can configure syslogd so that it doesn't sync the disks after every line in the log file - man syslog.conf

This way you'll still have the log file filled with crap, but the disk will spin only once in a while.

R.
 
Old 07-27-2009, 11:03 AM   #8
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
UPDATE -

I have had a busy weekend so have not yet gotten to examine whether or not I have selected excessive debugging of the usb-storage system. It is on my short list of things to do. (Thanks unspawn)

@ r0b0 - thanks for that reminder - I am aware of the option to sync/not sync, and actually I usually have it set to sync right away, thereby minimizing the losses during a power outage or other rapid exit and indeed, in this case you are completely right: it won't fix the issue, but at least the drive wouldn't be going all the time. Interestingly though, *IF* I do have some excessive debugging going on, I would perhaps not have known it (or remembered I had set it) if I had not been syncing the log right away (if indeed I am). As this is a relatively stock install, I'd have thought that the logging would have already been set to 'not sync'

Will let you know what I find when I get the time to revisit my kernel config (kinda waiting for the next kernel patch )

Sasha
 
Old 08-10-2009, 10:17 AM   #9
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by unSpawn View Post
Check your kernel config for CONFIG_USB_DEBUG=y or CONFIG_USB_STORAGE_DEBUG=y ?
Yep, finally got around to rebuilding a/the kernel. CONFIG_USB_STORAGE_DEBUG=y was the culprit.

Thanks again!

Sasha
 
Old 08-10-2009, 10:34 AM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,666
Blog Entries: 54

Rep: Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952
Thanks for posting your fix.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
usb device detection, manual insertion card(smart card) reader problem, zapkhiel Linux - Hardware 4 07-17-2009 09:50 AM
MEPIS: how to mount a flash card in an usb card reader for n00b frenchn00b Linux - General 1 08-06-2008 06:26 PM
USB jumpdrive/ USB hud-card reader issues o0gnubee0o Linux - Hardware 4 07-03-2005 07:12 PM
Smartcard/Flash card reader (usb storage device) Redhat 9 i0scanw Linux - Newbie 0 10-19-2003 06:43 PM
Multi Card Reader (usb mass storage) Shak Linux - Hardware 11 03-06-2003 07:47 AM


All times are GMT -5. The time now is 11:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration