Skip to contentSkip to conversation

Dmesg not being dumped

DISCUSSION Nikolay Borisov 5 participants 9 messages Aug 19, 2015 – Aug 21, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

I've recently noticed that when creating crashdumps the dmesg is not being saved. The error reported is this: "Missing the struct log size export". I've tested with both kernel 4.1.1 and 3.12.28. My version of kexec tools is : kexec-tools 2.0.9 released 04 June 2015. The kernel has been compiled with debugging info so the respective symbol should be exported but apparently it is not. Any ideas how to debug that?

[Please CC me as I'm not subscribed to the mailing list.]

Regards,
Nikolay

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#1 lore raw
Quoted 8 lines · Nikolay Borisov

Hello,

I've recently noticed that when creating crashdumps the dmesg is not being saved. The error reported is this: "Missing the struct log size export". I've tested with both kernel 4.1.1 and 3.12.28. My version of kexec tools is : kexec-tools 2.0.9 released 04 June 2015. The kernel has been compiled with debugging info so the respective symbol should be exported but apparently it is not. Any ideas how to debug that?

That would be more helpful if you can attach the 1st kernel and kdump kernel console log.

Quoted 10 lines

[Please CC me as I'm not subscribed to the mailing list.]

Regards,
Nikolay

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw

Hi,

Quoted 10 lines · Baoquan He
Quoted 8 lines · Nikolay Borisov

Hello,

I've recently noticed that when creating crashdumps the dmesg is not being saved. The error reported is this: "Missing the struct log size export". I've tested with both kernel 4.1.1 and 3.12.28. My version of kexec tools is : kexec-tools 2.0.9 released 04 June 2015. The kernel has been compiled with debugging info so the respective symbol should be exported but apparently it is not. Any ideas how to debug that?

Quoted 2 lines

That would be more helpful if you can attach the 1st kernel and kdump kernel console log.

I just tested with 4.1.6 with the same result. I'm sending you a link to the bzImage in question
http://georgi.unixsol.org/cruft/tmp/bzImage-4.1.6-clouder1 ( I assume you meant the bzImage, if you need I can provide the vmlinux as well). Unfortunately, I couldn't figure how to obtain the log of kdump in textual format (and didn't want to send pictures). Here are the 3 relevant lines (from memory):

Saving vmcore-dmesg.txt
Missing the struct log size export
Error saving vmcore-dmesg.txt.

Yet, when I load the crashdump inside the 'crash' utility and invoke the 'log' command the dmesg log is there. Whereas the vmcore-dmesg-incomplete.txt is empty.

Quoted 11 lines
Quoted 11 lines

[Please CC me as I'm not subscribed to the mailing list.]

Regards,
Nikolay

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#5 lore raw
In reply to Nikolay Borisov

Hi. Nikolay.

Does kexec-tools work for original rhel kernel, like 3.10.0-xxx. Also do you specify the config to build the kernel? It is appropriate if you can paste the config related to the kexec.

Thanks
Minfei

Quoted 11 lines · Nikolay Borisov

Hello,

I've recently noticed that when creating crashdumps the dmesg is not being saved. The error reported is this: "Missing the struct log size export". I've tested with both kernel 4.1.1 and 3.12.28. My version of kexec tools is : kexec-tools 2.0.9 released 04 June 2015. The kernel has been compiled with debugging info so the respective symbol should be exported but apparently it is not. Any ideas how to debug that?

[Please CC me as I'm not subscribed to the mailing list.]

Quoted 7 lines

Regards,
Nikolay

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#6 lore raw
Quoted 1 line · Minfei Huang

Hi. Nikolay.

Hi

Quoted 2 lines

Does kexec-tools work for original rhel kernel, like 3.10.0-xxx. Also do

Unfortunately I canno test with an official rhel kernel since we are not using those. Also, the problem is not that kexec is not working at all, but just that the dmesg log is not being saved in the vmcore-dmesg.txt file. Here are the relevant portion of the my .config which deal with debug info:

CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
# CONFIG_DEBUG_INFO_DWARF4 is not set

The failures is happening (according to my reading of the vmcore-dmesg.c file) here:

+ if (!log_sz) {
+ fprintf(stderr, "Missing the struct log size export\n");
+ exit(64);
+ }

And log_size is being set here:

		str = "SIZE(printk_log)=";
		if (memcmp(str, pos, strlen(str)) == 0)
			log_sz = strtoull(pos + strlen(str), NULL, 10);

The pertinent question I guess is why this string cannot be found in the resulting vmcore image. I just tried with kexec 2.0.10 and the result is the same.

Quoted 25 lines

you specify the config to build the kernel? It is appropriate if you can paste the config related to the kexec.

Thanks
Minfei

Quoted 18 lines · Nikolay Borisov

Hello,

I've recently noticed that when creating crashdumps the dmesg is not being saved. The error reported is this: "Missing the struct log size export". I've tested with both kernel 4.1.1 and 3.12.28. My version of kexec tools is : kexec-tools 2.0.9 released 04 June 2015. The kernel has been compiled with debugging info so the respective symbol should be exported but apparently it is not. Any ideas how to debug that?

[Please CC me as I'm not subscribed to the mailing list.]

Regards,
Nikolay

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#7 lore raw
Quoted 10 lines · Nikolay Borisov
Quoted 2 lines · Minfei Huang

Hi. Nikolay.
Does kexec-tools work for original rhel kernel, like 3.10.0-xxx. Also do

Unfortunately I canno test with an official rhel kernel since we are not using those. Also, the problem is not that kexec is not working at all, but just that the dmesg log is not being saved in the vmcore-dmesg.txt file. Here are the relevant portion of the my .config which deal with debug info:

Quoted 4 lines

CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
# CONFIG_DEBUG_INFO_DWARF4 is not set

I ran the kexec-tools-2.0.7-35 on kernel 4.2.0-rc5+ and kdump works successfully to dump the vmcore. The kernel is built by the default config (generated by make defconfig). Following is the relevant portions of the config.

 # cat .config | grep KEXEC
CONFIG_KEXEC=y
CONFIG_KEXEC_FILE=y
CONFIG_KEXEC_VERIFY_SIG=y
CONFIG_KEXEC_BZIMAGE_VERIFY_SIG=y
CONFIG_KEXEC_JUMP=y
 # cat .config | grep DEBUG_INFO
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
# CONFIG_DEBUG_INFO_DWARF4 is not set

Thanks
Minfei

Quoted 11 lines

The failures is happening (according to my reading of the vmcore-dmesg.c file) here:

(quoted diff) +4 -0
+	if (!log_sz) {
+		fprintf(stderr, "Missing the struct log size export\n");
+		exit(64);
+	}

And log_size is being set here:

Quoted 7 lines
		str = "SIZE(printk_log)=";
		if (memcmp(str, pos, strlen(str)) == 0)
			log_sz = strtoull(pos + strlen(str), NULL, 10);

The pertinent question I guess is why this string cannot be found in the resulting vmcore image. I just tried with kexec 2.0.10 and the result is the same.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#8 lore raw
Quoted 33 lines · Minfei Huang
Quoted 10 lines · Nikolay Borisov
Quoted 2 lines · Minfei Huang

Hi. Nikolay.
Does kexec-tools work for original rhel kernel, like 3.10.0-xxx. Also do

Unfortunately I canno test with an official rhel kernel since we are not using those. Also, the problem is not that kexec is not working at all, but just that the dmesg log is not being saved in the vmcore-dmesg.txt file. Here are the relevant portion of the my .config which deal with debug info:

Quoted 4 lines

CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
# CONFIG_DEBUG_INFO_DWARF4 is not set

I ran the kexec-tools-2.0.7-35 on kernel 4.2.0-rc5+ and kdump works successfully to dump the vmcore. The kernel is built by the default config (generated by make defconfig). Following is the relevant portions of the config.

 # cat .config | grep KEXEC
CONFIG_KEXEC=y
CONFIG_KEXEC_FILE=y
CONFIG_KEXEC_VERIFY_SIG=y
CONFIG_KEXEC_BZIMAGE_VERIFY_SIG=y
CONFIG_KEXEC_JUMP=y
 # cat .config | grep DEBUG_INFO
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
# CONFIG_DEBUG_INFO_DWARF4 is not set
Quoted 2 lines

Thanks
Minfei

I only have CONFIG_KEXEC=y but the others are not necessary as far as I can tell. I don't do any verification so the VERIFY_SIG are disabled. KEXEC_JUMP is also n, since I haven't enabled hibernation and KEXEC_FILE is also not critical. My debug info is the same as yours.

Quoted 12 lines
Quoted 12 lines

The failures is happening (according to my reading of the vmcore-dmesg.c file) here:

(quoted diff) +4 -0
+	if (!log_sz) {
+		fprintf(stderr, "Missing the struct log size export\n");
+		exit(64);
+	}

And log_size is being set here:

Quoted 7 lines
Quoted 7 lines
		str = "SIZE(printk_log)=";
		if (memcmp(str, pos, strlen(str)) == 0)
			log_sz = strtoull(pos + strlen(str), NULL, 10);

The pertinent question I guess is why this string cannot be found in the resulting vmcore image. I just tried with kexec 2.0.10 and the result is the same.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#3 lore raw
In reply to Nikolay Borisov

Hi Nikolay,

Quoted 10 lines · Nikolay Borisov

Hi,

Quoted 7 lines · Baoquan He
Quoted 6 lines · Nikolay Borisov

Hello,

I've recently noticed that when creating crashdumps the dmesg is not being saved. The error reported is this: "Missing the struct log size export". I've tested with both kernel 4.1.1 and 3.12.28. My version of kexec tools is : kexec-tools 2.0.9 released 04 June 2015. The kernel has

Are you sure if you have 2.0.9. I see 2.0.9 is dated 09 Feb 2015.

commit 8e762175d295aad08a1cc62d6394e8285f225a40

Author: Simon Horman <[email protected]>
Date:   Mon Feb 9 14:33:24 2015 +0900
    kexec-tools 2.0.9
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

been compiled with debugging info so the respective symbol should be exported but apparently it is not. Any ideas how to debug that?

Can you please cross check that you have following patch in your kexec-tool. If you have that patch, then its really strange that you see this issue.

commit c96b723e17eb4af689de494b636d8bded4b98c88

Author: Vivek Goyal <[email protected]>
Date:   Thu May 22 10:43:14 2014 -0400

vmcore-dmesg: Handle struct log to struct printk_log renaming

~Pratyush

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#4 lore raw
Quoted 7 lines · Pratyush Anand

Hi Nikolay,

Quoted 4 lines · Nikolay Borisov

Hi,

Quoted 1 line · Baoquan He

On 08/19/15 at 09:21am, Nikolay Borisov wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Hello,

I've recently noticed that when creating crashdumps the dmesg is not being saved. The error reported is this: "Missing the struct log size export". I've tested with both kernel 4.1.1 and 3.12.28. My version of kexec tools is : kexec-tools 2.0.9 released 04 June 2015. The kernel has

Are you sure if you have 2.0.9. I see 2.0.9 is dated 09 Feb 2015.

I believe the release date is not the real "release date" if one use kexec --version

Because for kexec --version the date is created while building, it is actually the build date instead of release date.

Thanks
Dave

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec