Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 198041 - Booting hangs at "Freeing unused kernel memory" (ahci issue)
Summary: Booting hangs at "Freeing unused kernel memory" (ahci issue)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard: linux-2.6.24
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-04 10:41 UTC by Erik Dobak
Modified: 2008-02-13 16:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
.config (with ahci in kernel) (.config,53.21 KB, text/plain)
2007-11-06 14:57 UTC, Erik Dobak
Details
dmesg with 3 kernel configurations (dmesg.txt,3.34 KB, text/plain)
2007-11-06 14:59 UTC, Erik Dobak
Details
linux-2.6.24-rc6.tar.gz.sign - signature of the kernel i have installed (linux-2.6.24-rc6.tar.gz.sign,248 bytes, text/plain)
2007-12-24 17:36 UTC, Erik Dobak
Details
dmesg with qc timeout in 2.6.24 (dmesg-2.6.24.txt,18.30 KB, text/plain)
2008-02-01 22:12 UTC, Erik Dobak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Dobak 2007-11-04 10:41:28 UTC
please read the troubleshooting on the forums http://forums.gentoo.org/viewtopic-t-604538-highlight-.html

Reproducible: Sometimes

Steps to Reproduce:
1. use a sata dvd
2. build kernel with ahci drivers inside kernel, not module
3. try to reboot 10 times

Actual Results:  
with ahci in kernel the system hangs up occasionaly at freeing kernel memory. when it passes trough this the dvd works fine. with ahci as Module the dvd does not work (see dmesg in forums). with nvidia drivers dvd does not work...

Expected Results:  
i expect linux not to hang at "freeing unused kernel memory"

and let me know what else i could check...
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-11-04 11:21:10 UTC
(In reply to comment #0)
> please read the troubleshooting on the forums
> http://forums.gentoo.org/viewtopic-t-604538-highlight-.html

Nope, please post all relevant info here, referring to forums and other third-party site for bug descriptions makes search useless for anyone having the same issue.
Comment 2 Erik Dobak 2007-11-05 21:55:33 UTC
in general i have 2 different issues one when ahci is in kernel and one when its  as Module.in kernel occasionaly the whole pc hang up at freeing the memory and in module i get a delay. afterwards the system boots but w/o dvd support. please check the dmesg of the 'ahci in module' where you can find a "qc timeout".

the dmesg of the "ahci in kernel" kernel version is allway ok as when the system sporadicaly hangs i am not able to make a dmesg for you.

finaly when i unplug my dvd i have 100% success in booting in any of 2 upper mentioned cases.



hardware:
motherboard: MSI K9N Neo-F V3 - nForce560, SATA II
dvd: PLEXTOR PX-810SA SATA (pluged into 1st sata port)

kernel: 2.6.22-gentoo-r8

.config (with ahci in kernel): http://pastebin.com/m4ee2c8a3 

dmesg with 3 kernel configurations: http://pastebin.com/f805a585
1. dmesg: with Nvidia Sata support in kernel (dvd does not work)
2. dmesg: ahci as module (booting is delayed - "qc timeout", dvd does not work)
3. dmesg: with ahci in kernel (boot sporadicaly hangs when freeing memory, dvd works)



i did try to fix the "ahci as module" issue with irqpoll in grub boot line but it did not fix the "qc timeout" as stated here:
http://fak3r.com/2007/06/22/failed-to-set-xfermode-solved/
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-11-05 22:01:08 UTC
And *please* no pastebins; the links expire in days. Once again, please post/attach everything relevant to this bug, do not refer to any third-party links for bug description.
Comment 4 Erik Dobak 2007-11-06 14:57:06 UTC
Created attachment 135335 [details]
.config (with ahci in kernel)
Comment 5 Erik Dobak 2007-11-06 14:59:54 UTC
Created attachment 135336 [details]
dmesg with 3 kernel configurations

1. dmesg: with Nvidia Sata support in kernel (dvd does not work)
2. dmesg: ahci as module (booting is delayed - "qc timeout", dvd does not work)
3. dmesg: with ahci in kernel (boot sporadicaly hangs when freeing memory, dvd
works)
Comment 6 Erik Dobak 2007-11-06 15:07:55 UTC
now i get it ;) you want me to use attachments.

all relevant links from comment #2 are in attachments

the 'qc timeout' issue with AHCI as Module was fixed as described below but does not work for me:

There’s a known bug in Ubuntu 7.04 (Feisty) with some ata detection routine that causes the system to take over 2 minutes to boot. Since this has happened to me more than once I’m documenting it here for me, and for other desperate souls that may find their way here. If your system is very slow to boot, and you see error messages in your dmesg (`dmesg | grep ata`) such as this:

[ 34.122465] ata1.00: qc timeout (cmd 0xef)
[ 34.122519] ata1.00: failed to set xfermode (err_mask=0x4)
[ 34.122565] ata1: failed to recover some devices, retrying in 5 secs
[ 46.260055] ata1: port is slow to respond, please be patient (Status 0x90)
[ 69.218482] ata1: port failed to respond (30 secs, Status 0x90)

You just need to ad `irqpoll` to your grub line. So in so in /boot/grub/menu.lst I added irqpoll to the kernel line:

kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=48c5a348-eb39-4171-8531-671a49fdb75b ro quiet splash irqpoll

and it fixes the issue. Probably a work around, but since this resets every time you install a new kernel you’ll realize when it’s broken and when it’s fixed. Oh, and my system boots in 21 seconds now…is it geeky that I know that, and I tweaked the system to make it boot faster than the 27 seconds it was booting in? I guess we’ll never know! ;)
Comment 7 Mike Pagano gentoo-dev 2007-12-19 19:46:38 UTC
Is this still an issue with later kernels. I see a numerous number of commits in ahci. Can you test with vanilla-sources-2.6.24_rc5 and post the results.

Comment 8 Erik Dobak 2007-12-24 17:30:52 UTC
Hi Mike, i did build a kernel from here ftp://ftp.eu.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.24-rc6.tar.bz2 hope this is vanilla, and will test it next weeks. 

after the kernel was build i had to reboot several times due to some other issue, so until now i do not confirm the 'freeing mem. issue'. as soon as i get it during boot ups i will report it.

ps: is the link now ok or what shell i pastebin
Comment 9 Erik Dobak 2007-12-24 17:36:23 UTC
Created attachment 139261 [details]
linux-2.6.24-rc6.tar.gz.sign - signature of the kernel i have installed
Comment 10 Erik Dobak 2007-12-26 12:02:08 UTC
with the vanilla 2.6.24-rc6 kernel and AHCI as Module the 'qc timeout' issue disapeared.

i will keep on testing with AHCI in kernel, until now i have more than 20 sucessfull boots and no memory freeing hangup.
Comment 11 Daniel Drake (RETIRED) gentoo-dev 2007-12-26 22:02:22 UTC
Thanks for keeping us updated. It would be interesting to know if this was fixed in 2.6.23 or in the 2.6.24-rc series. Testing 2.6.23 would clarify that, although may not be worth the effort given that nobody else seems to have run into this bug.
Comment 12 Erik Dobak 2007-12-26 22:21:34 UTC
no problem, but i will go on vacation now. will return on 30dec2007. you want to check vanilla again or kernel provided by gentoo?
Comment 13 Daniel Drake (RETIRED) gentoo-dev 2007-12-26 23:18:13 UTC
Either one will do, thanks! enjoy your vacation :)
Comment 14 Erik Dobak 2007-12-30 20:20:11 UTC
with vanilla 2.6.23.9 i got the same issues as with the 2.6.22... kernel. tested with ahci as module and in kernel.

i will stick now with the 2.6.24-rc6 for a while.

and thanks the vacation was short but great, looking forward the next one :D
Comment 15 Erik Dobak 2008-02-01 22:12:07 UTC
Created attachment 142437 [details]
dmesg with qc timeout in 2.6.24
Comment 16 Erik Dobak 2008-02-01 22:25:46 UTC
now with vanilla 2.6.24 kernel and ahci in kernel:

i could not reproduce the "Booting hangs at "Freeing unused kernel memory"" issue, which is good :)

but i noticed that i get sporadicaly the "qc timeout" folowed by a retry in 5 seconds and the 2nd time was allways a success.. 

so in general i have now none of this bug's issues. just wanted to let you know.

Comment 17 Daniel Drake (RETIRED) gentoo-dev 2008-02-13 16:46:55 UTC
I am not making any progress on figuring out which post-2.6.23 change fixed this problem, and given that it only seems to affect 1 person plus we are hoping for 2.6.24 stable quite soon, I'm closing this as a "fixed in 2.6.24" bug, with no backports to 2.6.23.

Thanks for all the testing.