Re: [Crash-utility] 答复: [External Mail]Re: zram decompress support for gcore/crash-utility
Make the mistake cause by patch update please re-check the new patch From: Dave Anderson Sent: Friday, April 10, 2020 22:57 To: 赵乾利 Cc: d hatayama; Discussion list for crash utility usage, maintenance and development Subject: Re: 答复: [External Mail]Re: [Crash-utility] zram decompress support for gcore/crash-utility - Original Message - > I got little problem to compile 32-bit on my x86-64 host.. > 96 /usr/bin/ld: skipping incompatible > /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a when searching for -lgcc > 97 /usr/bin/ld: cannot find -lgcc > 98 /usr/bin/ld: skipping incompatible > /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc_s.so when searching for -lgcc_s > 99 /usr/bin/ld: cannot find -lgcc_s > > I think i have fixed the build warning,but failed rebuild in 32-bit since > above error,please help confirm,and move log to try_zram_decompress,please > check the attachment. The patch now compiles OK, but my first simple test shows that something is obviously wrong with the patch. Here are a set of user-space addresses that have been swapped out to disk: crash> set 1 PID: 1 COMMAND: "systemd" TASK: 92a13a1e8000 [THREAD_INFO: 92a13a26] CPU: 2 STATE: TASK_INTERRUPTIBLE crash> vm -p | grep SWAP 55d917fb5000 SWAP: /dev/dm-2 OFFSET: 55827 55d917fb7000 SWAP: /dev/dm-2 OFFSET: 55828 55d917fc2000 SWAP: /dev/dm-2 OFFSET: 121359 55d917fc6000 SWAP: /dev/dm-2 OFFSET: 88579 55d917fcb000 SWAP: /dev/dm-2 OFFSET: 88581 55d917fcc000 SWAP: /dev/dm-2 OFFSET: 88582 55d917fcd000 SWAP: /dev/dm-2 OFFSET: 88583 55d917fce000 SWAP: /dev/dm-2 OFFSET: 104963 55d917fcf000 SWAP: /dev/dm-2 OFFSET: 104964 ... Obviously any read of the addresses above should fail, but each read returns successfully, and each read is screwing up the internal buffering scheme: crash> rd -u 55d917fb5000 55d917fb5000: WARNING: malloc/free mismatch (53/54) crash> rd -u 55d917fb7000 55d917fb7000: WARNING: malloc/free mismatch (53/55) crash> rd -u 55d917fc2000 55d917fc2000: WARNING: malloc/free mismatch (53/56) crash> rd -u 55d917fc6000 55d917fc6000: WARNING: malloc/free mismatch (53/57) crash> Dave #/**本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!**/# <> -- Crash-utility mailing list Crash-utility@redhat.com https://www.redhat.com/mailman/listinfo/crash-utility
Re: [Crash-utility] 答复: [External Mail]Re: zram decompress support for gcore/crash-utility
- Original Message - > I got little problem to compile 32-bit on my x86-64 host.. > 96 /usr/bin/ld: skipping incompatible > /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a when searching for -lgcc > 97 /usr/bin/ld: cannot find -lgcc > 98 /usr/bin/ld: skipping incompatible > /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc_s.so when searching for -lgcc_s > 99 /usr/bin/ld: cannot find -lgcc_s > > I think i have fixed the build warning,but failed rebuild in 32-bit since > above error,please help confirm,and move log to try_zram_decompress,please > check the attachment. The patch now compiles OK, but my first simple test shows that something is obviously wrong with the patch. Here are a set of user-space addresses that have been swapped out to disk: crash> set 1 PID: 1 COMMAND: "systemd" TASK: 92a13a1e8000 [THREAD_INFO: 92a13a26] CPU: 2 STATE: TASK_INTERRUPTIBLE crash> vm -p | grep SWAP 55d917fb5000 SWAP: /dev/dm-2 OFFSET: 55827 55d917fb7000 SWAP: /dev/dm-2 OFFSET: 55828 55d917fc2000 SWAP: /dev/dm-2 OFFSET: 121359 55d917fc6000 SWAP: /dev/dm-2 OFFSET: 88579 55d917fcb000 SWAP: /dev/dm-2 OFFSET: 88581 55d917fcc000 SWAP: /dev/dm-2 OFFSET: 88582 55d917fcd000 SWAP: /dev/dm-2 OFFSET: 88583 55d917fce000 SWAP: /dev/dm-2 OFFSET: 104963 55d917fcf000 SWAP: /dev/dm-2 OFFSET: 104964 ... Obviously any read of the addresses above should fail, but each read returns successfully, and each read is screwing up the internal buffering scheme: crash> rd -u 55d917fb5000 55d917fb5000: WARNING: malloc/free mismatch (53/54) crash> rd -u 55d917fb7000 55d917fb7000: WARNING: malloc/free mismatch (53/55) crash> rd -u 55d917fc2000 55d917fc2000: WARNING: malloc/free mismatch (53/56) crash> rd -u 55d917fc6000 55d917fc6000: WARNING: malloc/free mismatch (53/57) crash> Dave -- Crash-utility mailing list Crash-utility@redhat.com https://www.redhat.com/mailman/listinfo/crash-utility
Re: [Crash-utility] 答复: [External Mail]Re: zram decompress support for gcore/crash-utility
I got little problem to compile 32-bit on my x86-64 host.. 96 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a when searching for -lgcc 97 /usr/bin/ld: cannot find -lgcc 98 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc_s.so when searching for -lgcc_s 99 /usr/bin/ld: cannot find -lgcc_s I think i have fixed the build warning,but failed rebuild in 32-bit since above error,please help confirm,and move log to try_zram_decompress,please check the attachment. From: Dave Anderson Sent: Friday, April 10, 2020 1:00 To: 赵乾利 Cc: d hatayama; Discussion list for crash utility usage, maintenance and development Subject: Re: 答复: [External Mail]Re: [Crash-utility] zram decompress support for gcore/crash-utility - Original Message - > Hi,Dave > > I modified RETURN_ON_ERROR to FAULT_ON_ERROR in all readmem,patch has > > attached. > The reason for adding "decompress success" is that i want indicate that zram > address is different from the normal address,and calling zram_decompress not > only readmem failures,but also decompression failures etc.i add "This page > has swaped to zram"/"zram decompress success" as the signature log,and these > log only printed when pc->debug >= 2. > > When gcore read UVA address,there may be many page fault happened,we can only > deal with zram swap,"not mapped" and other types of swap will not be > processed.For debug request,we may need the signature log for zram. > so i think it's better to keep this log. OK fine, but please move the message out of readmem(), and put it at the end of try_zram_decompress() where it really belongs. You'll have to replace the "PAGEOFFSET(addr)" argument with "ulonglong addr", and then do the PAGEOFFSET() in try_zram_decompress(). Also, this doesn't compile cleanly on 32-bit architectures: $ make warn TARGET: X86 CRASH: 7.2.9rc10 GDB: 7.6 ... cc -c -g -DX86 -m32 -D_FILE_OFFSET_BITS=64 -DLZO -DSNAPPY -DGDB_7_6 diskdump.c -Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -fstack-protector -Wformat-security diskdump.c: In function 'lookup_swap_cache': diskdump.c:2657:2: warning: right shift count >= width of type [enabled by default] swp_type = __swp_type(pte_val); ^ diskdump.c:2659:3: warning: right shift count >= width of type [enabled by default] swp_offset = (ulonglong)__swp_offset(pte_val); ^ diskdump.c: In function 'try_zram_decompress': diskdump.c:2709:3: warning: right shift count >= width of type [enabled by default] swap_info += (__swp_type(pte_val) * sizeof(void *)); ^ diskdump.c:2713:3: warning: right shift count >= width of type [enabled by default] swap_info += (SIZE(swap_info_struct) * __swp_type(pte_val)); ^ diskdump.c:2745:4: warning: right shift count >= width of type [enabled by default] swp_offset = (ulonglong)__swp_offset(pte_val); ... Thanks, Dave #/**本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!**/# <> -- Crash-utility mailing list Crash-utility@redhat.com https://www.redhat.com/mailman/listinfo/crash-utility