View previous topic :: View next topic |
Author |
Message |
PhiJ Apprentice
Joined: 20 Dec 2005 Posts: 173 Location: UK
|
Posted: Thu Sep 04, 2008 8:12 am Post subject: max no of CPUs = 2 causes modules load fail [SOLVED] |
|
|
I recompiled my kernal (changing CPU features and putting all changes directly into the kernel) and now on startup I get a modules error. Then ALSA tries to load and locks. If I skip ALSA on startup everything works fine.
I tried running make menuconfig, but I can't see what change I made that would have made the difference.
Oh, and the output in /var/log/everything/current that looks like it is the error I got is
Quote: | Sep 4 08:50:35 [kernel] Freeing unused kernel memory: 360k freed
Sep 4 08:50:35 [kernel] BUG: unable to handle kernel paging request at ffffffff880061c0
Sep 4 08:50:35 [kernel] IP: [<ffffffff8024b2af>] load_module+0x91e/0x175c
Sep 4 08:50:35 [kernel] PGD 203067 PUD 207063 PMD 3e4ea067 PTE 0
Sep 4 08:50:35 [kernel] CPU 1
Sep 4 08:50:35 [kernel] Modules linked in: snd_page_alloc
Sep 4 08:50:35 [kernel] Pid: 2326, comm: modprobe Not tainted 2.6.25-gentoo-r7 #2
Sep 4 08:50:35 [kernel] RIP: 0010:[<ffffffff8024b2af>] [<ffffffff8024b2af>] load_module+0x91e/0x175c
Sep 4 08:50:35 [kernel] RSP: 0018:ffff81003e1e5df8 EFLAGS: 00010246
Sep 4 08:50:35 [kernel] RAX: ffffffff880061c0 RBX: ffffc200001e4000 RCX: 0000000000000000
Sep 4 08:50:35 [kernel] RDX: 0000000000000019 RSI: ffffc200001e6de4 RDI: ffffffff880057e4
Sep 4 08:50:35 [kernel] RBP: fffffffffffffff4 R08: ffffc200001e56c0 R09: 0000000000000019
Sep 4 08:50:35 [kernel] R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff88005800
Sep 4 08:50:35 [kernel] R13: 0000000000000004 R14: ffffc200001e50c0 R15: 00000000006163e0
Sep 4 08:50:35 [kernel] FS: 00007f163cd5a6f0(0000) GS:ffff81003fa06dc0(0000) knlGS:0000000000000000
Sep 4 08:50:35 [kernel] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Sep 4 08:50:35 [kernel] CR2: ffffffff880061c0 CR3: 000000003e44b000 CR4: 00000000000006e0
Sep 4 08:50:35 [kernel] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Sep 4 08:50:35 [kernel] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Sep 4 08:50:35 [kernel] Process modprobe (pid: 2326, threadinfo ffff81003e1e4000, task ffff81003e4e3040)
Sep 4 08:50:35 [kernel] Stack: ffff81003e4e3040 ffffc200001e4000 ffffc200001e56c0 ffffc200001e5500
Sep 4 08:50:35 [kernel] ffffc200001e5680 ffffc200001e4fcc ffff81003e8a46c0 ffffc200001e68b8
Sep 4 08:50:35 [kernel] 0000000000000017 0000000d00000000 0000000c00000000 0000000000000000
Sep 4 08:50:35 [kernel] Call Trace:
Sep 4 08:50:35 [kernel] [<ffffffff8027edf6>] ? vfs_read+0xaa/0x132
Sep 4 08:50:35 [kernel] [<ffffffff8024c13a>] ? sys_init_module+0x4d/0x195
Sep 4 08:50:35 [kernel] [<ffffffff8020ae5b>] ? system_call_after_swapgs+0x7b/0x80
Sep 4 08:50:35 [kernel] RIP [<ffffffff8024b2af>] load_module+0x91e/0x175c
Sep 4 08:50:35 [kernel] RSP <ffff81003e1e5df8>
Sep 4 08:50:35 [kernel] ---[ end trace f72edea797b0aeba ]--- |
Last edited by PhiJ on Sat Sep 06, 2008 8:03 am; edited 2 times in total |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Thu Sep 04, 2008 11:21 am Post subject: |
|
|
Hi, did you run :
Code: |
# make && make modules_install
|
Also, maybe you should backup your .config and then run a make clean to reset your kernel config. |
|
Back to top |
|
|
bastibasti Guru
Joined: 27 Nov 2006 Posts: 589
|
Posted: Thu Sep 04, 2008 2:19 pm Post subject: |
|
|
have you "make clean" before "make all"!?!?!?? |
|
Back to top |
|
|
PhiJ Apprentice
Joined: 20 Dec 2005 Posts: 173 Location: UK
|
Posted: Thu Sep 04, 2008 10:22 pm Post subject: |
|
|
I ran make menuconfig to do the changes originally, and then make && make modules_install to install them (possibly with a && exit on the end of that string). No I didn't run make clean or make all. No idea what all does, but I wanted to just tweak my previous config a little. |
|
Back to top |
|
|
sundialsvc4 Guru
Joined: 10 Nov 2005 Posts: 436
|
Posted: Thu Sep 04, 2008 11:22 pm Post subject: |
|
|
Be sure to make and keep backup-copies of your "/usr/src/linux/.config" (hidden... notice the leading ".") file. This is where all your configuration-settings live.
You should keep a pristine copy of this "last known-good" configuration before making any changes. It is also useful as a file that you can diff against the current configuration to see exactly what the differences are between the two.
When you change the kernel, it is imperative that you recompile everything. Modules and all. make clean will expunge any existing object-modules, thus forcing the next "make" to be complete. (Some "make" commands will delete the configuration-file... hence the admonition to make pristine backup-copies frequently. I have a directory dedicated to this purpose in "/root," and I immediately chmod the backups to make them read-only.)
Anytime you contemplate changing something as fundamental to your system as "the kernel," always have a fallback plan! |
|
Back to top |
|
|
bastibasti Guru
Joined: 27 Nov 2006 Posts: 589
|
Posted: Fri Sep 05, 2008 5:16 am Post subject: |
|
|
If you change anything on your kernel config (adding alsa etc) you need to "make clean" in order to delete old fragments of compiled code. This code has been compiled with the previous .config and might not work. I had the same problems with wireless. |
|
Back to top |
|
|
PhiJ Apprentice
Joined: 20 Dec 2005 Posts: 173 Location: UK
|
Posted: Fri Sep 05, 2008 10:08 am Post subject: max no of CPUs = 2 causes modules load fail |
|
|
Yay! I found the problem: Setting max CPUs to 2 (instead of 32) caused it. I would like to know why that is though.
As we're not meant to post multiple times about the same problem, I'm going to take a guess at how to change the subject of the thread to something more specific (is that allowed)?
Thanks for the hints everyone!
So. yes. The question is now
Changing the max number of supported cpus in my kernel to 2 from 32 causes an error on bootup, and ALSA can't load modules. I have two CPUs (X2), so I don't see why this should be a problem. Is there any way of fixing this and dropping the max number of CPUs to 2?
Oh, and the error message is quoted in my first post. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Fri Sep 05, 2008 11:21 am Post subject: |
|
|
Maybe this kind of change make all the modules and the rest incompatible if they are not properly recompiled with the new setting. |
|
Back to top |
|
|
bastibasti Guru
Joined: 27 Nov 2006 Posts: 589
|
Posted: Fri Sep 05, 2008 11:30 am Post subject: |
|
|
That is exactly what I said. You cange a setting on the kernel core, and the modules become unstable. You HAVE TO run "make clean" before you run "make all" and then "make install" and "make modules_install" |
|
Back to top |
|
|
PhiJ Apprentice
Joined: 20 Dec 2005 Posts: 173 Location: UK
|
Posted: Fri Sep 05, 2008 10:32 pm Post subject: |
|
|
Wait.. 'make all'? 'make install'? I've been running 'make menuconfig', saving my configuration and then running 'make && make modules_install'. Since being told about it I've run 'make clean' between 'make menuconfig' and 'make'. That is right isn't it? I don't need to run it again between 'make' and 'make modules_install' do I? (from the little I understand of the two commands, that sounds like it may bust things.)
Edit: Oh, but when compiling my kernel, I noticed I had a few section mismatches, but I also had some when compiling it with max 32 cpus. Don't know if it's relevant. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9882 Location: almost Mile High in the USA
|
Posted: Fri Sep 05, 2008 11:51 pm Post subject: |
|
|
Careful with options. Some of the options require a full kernel rebuild and restart with the complete kernel, along with the modules. Stuff like changing SMP or memory options potentially has impacts to the rest of the kernel especially in allocating space for buffers, etc., and cause incompatible modules. A lot of these options change the include options file, and hence get propagated down into a lot of modules, causing incompatibility.
Are you booting the full, new kernel with the changed modules? Do you have module versioning and mismatch warnings turned off or something?
As a rule of thumb, only options that are marked with <> you can potentially hit 'M' and rebuild modules without having to go through a full kernel compile. If you have to hit Y or change a number to something with [] then all bets are off. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
pappy_mcfae Watchman
Joined: 27 Dec 2007 Posts: 5999 Location: Pomona, California.
|
Posted: Sat Sep 06, 2008 7:18 am Post subject: |
|
|
All you need to enter to compile a kernel is make. That's it! After that, then you enter make modules_install. I never use make all or make install when I work with my kernels. I prefer to name my kernels and copy them manually.
It's not that typing make all and make install is incorrect as much as it's a question of necessity. Make has made my kernels since I started playing with it under Slackware. Even though I can type 280 WPM with 96% accuracy, I'm still a lazy typist. Why type all those extra unnecessary letters?
Blessed be!
Pappy _________________ This space left intentionally blank, except for these ASCII symbols. |
|
Back to top |
|
|
PhiJ Apprentice
Joined: 20 Dec 2005 Posts: 173 Location: UK
|
Posted: Sat Sep 06, 2008 7:56 am Post subject: |
|
|
Errr yes. It was going to be a silly mistake wasn't it. I never copied the bzImage over to the boot partition. So it works now, and so do some minor problems I was going to post about after this one had been resolved. |
|
Back to top |
|
|
bastibasti Guru
Joined: 27 Nov 2006 Posts: 589
|
Posted: Mon Sep 08, 2008 5:36 am Post subject: |
|
|
dont understand, copy it over by hand? make install copies it over!? |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Mon Sep 08, 2008 11:33 am Post subject: |
|
|
Make install copy it over, but if you want to have the control, just use this kind of command :
Code: |
# cd /usr/src/linux
# cp arch/i386/boot/bzImage /boot/kernel-2.6.26-Gentoo0-r1
|
|
|
Back to top |
|
|
|