klogd-issue with System.map / size limitation for memory allocation on SMP-kernel
Dear listmembers, If this is a bounce - sorry - it seemed to be impossible to get that email to the list! a new week, (propably ...) new luck. I used to ask for the (apparent) klogd - issue. After some debugging work I figured out (by the help of Richard Mortimer) that I am hitting on a SMP problem. The allocation of sufficient memory for reading System.map fails. The error happens within the function sys_get_kernel_symbols. I had been wrongly looking into linux/kernel/modules.c at first, but today I modified linux/arch/sparc64/kernel/sys_sparc32.c, and I found it. What I found is that the allocation works up to 1820 elements of the size 72 Bytes, however, we would need a tiny little more (1843 in my case, please take a look into the attachement). Nevertheless: I cannot understand this, this must be related to some limitations to - well, to what? I want 132696 byte of ram, but get only 1820*72=131040. Am I right to assume a limit 2^17 here - for whatever reason I do not know. Please take a look into the attached excerpt of /var/log/messages and the patch I have been integrating into linux/arch/sparc64/kernel/sys_sparc32.c Can this be modified by changing some kernel parameters? Where does this limitation stem from? Many thanks for any inputs, take care Dieter Jurzitza -- HARMAN BECKER AUTOMOTIVE SYSTEMS Dr.-Ing. Dieter Jurzitza Manager Hardware Systems System Development Industriegebiet Ittersbach Becker-Göring Str. 16 D-76307 Karlsbad / Germany Phone: +49 (0)7248 71-1577 Fax: +49 (0)7248 71-1216 eMail: [EMAIL PROTECTED] Internet: http://www.becker.de *** Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und loeschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the contents in this e-mail is strictly forbidden. *** linux-2.4.26-sys_sparc32.patch.bz2 Description: linux-2.4.26-sys_sparc32.patch.bz2 messages.log.bz2 Description: messages.log.bz2
klogd issue
Dear listmembers, quite a while ago I detected an error with klogd (I didn't know at that time). When in SMP-mode, klogd gets an issue with the getsyms call on my U60. It shows as follows (on boot): Dec 9 09:59:02 oekalux09 syslogd 1.4.1#16: restart. Dec 9 09:59:02 oekalux09 kernel: klogd 1.4.1#16, log source = /proc/kmsg started. Dec 9 09:59:02 oekalux09 kernel: Inspecting /boot/System.map-2.4.26 Dec 9 09:59:03 oekalux09 kernel: Loaded 14218 symbols from /boot/System.map-2.4.26. Dec 9 09:59:03 oekalux09 kernel: Symbols match kernel version 2.4.26. Dec 9 09:59:03 oekalux09 kernel: Loaded 33 symbols from 3 modules. with SMP: Dec 9 09:18:14 oekalux09 syslogd 1.4.1#16: restart. Dec 9 09:18:14 oekalux09 kernel: klogd 1.4.1#16, log source = /proc/kmsg started. Dec 9 09:18:14 oekalux09 kernel: Inspecting /boot/System.map-2.4.26-SMP Dec 9 09:18:15 oekalux09 kernel: Loaded 14411 symbols from /boot/System.map-2.4.26-SMP. Dec 9 09:18:15 oekalux09 kernel: Symbols match kernel version 2.4.26. Dec 9 09:18:15 oekalux09 kernel: Error reading kernel symbols - Cannot allocate memory Tracing deeper into this I found the erratic behaviour in the ksym_mod.c - file of sysklogd. The call to getsyms on line 238 what is actually a call to get_kernel_syms is returning a negative value. This is especially strange because the man-page of get_kernel_syms tells me that: Returns the number of symbols returned. There is no possible error return. However, I think this is not the function that is called but some kernel function that actually returns the value. I found something in modules.c, however, the #define that can be found there does not fit, neither does the sys_ before it. I am definitively lost here and appreciate any inputs. Many thanks for your inputs, take care Dieter -- HARMAN BECKER AUTOMOTIVE SYSTEMS Dr.-Ing. Dieter Jurzitza Manager Hardware Systems System Development Industriegebiet Ittersbach Becker-Göring Str. 16 D-76307 Karlsbad / Germany Phone: +49 (0)7248 71-1577 Fax: +49 (0)7248 71-1216 eMail: [EMAIL PROTECTED] Internet: http://www.becker.de *** Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und loeschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the contents in this e-mail is strictly forbidden. ***