| Summary: | [4.3 M2 RC1] segfault for createrepo_c on beaglebone and qemuarm | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Runtime] General Runtime | Reporter: | Yi Zhao <yi.zhao> | ||||
| Component: | General Runtime | Assignee: | Richard Purdie <richard.purdie> | ||||
| Status: | VERIFIED FIXED | QA Contact: | Yi Zhao <yi.zhao> | ||||
| Severity: | normal | ||||||
| Priority: | Undecided | CC: | jay.shen.teoh, jing.hui.tham, jon.mason, raj.khem, richard.purdie, ross.burton, yi.zhao | ||||
| Version: | 4.3 | ||||||
| Target Milestone: | 4.3 M2 | ||||||
| Hardware: | BeagleBone | ||||||
| OS: | arm | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | Regression (Used to work) | ||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||
| Attachments: |
|
||||||
|
Description
Yi Zhao
2023-07-24 08:19:39 UTC
sqlite regressing on 32 bit arm? I reverted various upgrades back to 3.40.1 and it still segfaults I've confirmed it is the time64.inc changes that trigger the segfault Thread 1 "createrepo_c" received signal SIGSEGV, Segmentation fault.
__GI_strlen () at ../sysdeps/arm/armv6t2/strlen.S:126
126 ../sysdeps/arm/armv6t2/strlen.S: No such file or directory.
(gdb) bt
#0 __GI_strlen () at ../sysdeps/arm/armv6t2/strlen.S:126
#1 0xb6dd8434 in __printf_buffer (buf=buf@entry=0xbefff5f0, format=format@entry=0xbefff708 "", ap=..., mode_flags=mode_flags@entry=2)
at vfprintf-process-arg.c:435
#2 0xb6decd0e in __vasprintf_internal
(result_ptr=result_ptr@entry=0xbefff708, format=format@entry=0xbefff708 "", args=..., mode_flags=mode_flags@entry=2) at vasprintf.c:102
#3 0xb6e5ae38 in __vasprintf_chk (result_ptr=result_ptr@entry=0xbefff708, flag=flag@entry=1, format=format@entry=0xbefff708 "", ap=...)
at vasprintf_chk.c:36
#4 0xb6f401c4 in vasprintf (__ap=..., __fmt=<optimized out>, __ptr=0xbefff708) at /usr/include/bits/stdio2.h:169
#5 g_vasprintf (string=string@entry=0xbefff708, format=format@entry=0x0, args=...) at /usr/src/debug/glib-2.0/1_2.76.4-r0/glib/gprintf.c:340
#6 0xb6f16fb0 in g_strdup_vprintf (format=format@entry=0x0, args=..., args@entry=...) at /usr/src/debug/glib-2.0/1_2.76.4-r0/glib/gstrfuncs.c:553
#7 0xb6f17000 in g_strdup_printf (format=0xb6fd0e68 "%s%jd.%s.%ld%s") at /usr/src/debug/glib-2.0/1_2.76.4-r0/glib/gstrfuncs.c:583
#8 0xb6fbf8d6 in cr_append_pid_and_datetime (str=<optimized out>, suffix=suffix@entry=0x0) at /usr/src/debug/createrepo-c/0.21.1-r0/src/misc.c:1501
#9 0x00405962 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/createrepo-c/0.21.1-r0/src/createrepo_c.c:2473
Compile log has a corresponding:
/media/build/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/createrepo-c/0.21.1-r0/git/src/misc.c: In function 'cr_append_pid_and_datetime':
/media/build/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/createrepo-c/0.21.1-r0/git/src/misc.c:1501:49: warning: format '%ld' expects argument of type 'long int', but argument 5 has type '__suseconds
64_t' {aka 'long long int'} [-Wformat=]
1501 | gchar *result = g_strdup_printf("%s%jd.%s.%ld%s",
| ~~^
| |
| long int
| %lld
......
1505 | tv.tv_usec,
| ~~~~~~~~~~
| |
| __suseconds64_t {aka long long int}
Also suspect we may need to fix:
/media/build/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/createrepo-c/0.21.1-r0/git/src/xml_dump_repomd.c
/media/build/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/createrepo-c/0.21.1-r0/git/src/xml_dump_repomd.c: In function 'cr_xml_dump_repomd_body':
/media/build/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/createrepo-c/0.21.1-r0/git/src/xml_dump_repomd.c:146:41: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Wformat=]
146 | gchar *rev = g_strdup_printf("%ld", time(NULL));
| ~~^ ~~~~~~~~~~
| | |
| | time_t {aka long long int}
| long int
| %lld
and
/media/build/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/createrepo-c/0.21.1-r0/git/src/createrepo_c.c: In function 'duplicates_warning':
/media/build/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/createrepo-c/0.21.1-r0/git/src/createrepo_c.c:643:17: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'gint64' {aka 'long long int'} [-Wformat=]
643 | g_warning(" Sourced from location: \'%s\', build timestamp: %ld%s",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
644 | location.location,
645 | location.pkg->time_build,
| ~~~~~~~~~~~~~~~~~~~~~~~~
| |
| gint64 {aka long long int}
/media/build/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/createrepo-c/0.21.1-r0/recipe-sysroot/usr/include/glib-2.0/glib/gmessages.h:356:32: note: in definition of macro 'g_warning'
356 | __VA_ARGS__)
| ^~~~~~~~~~~
/media/build/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/createrepo-c/0.21.1-r0/git/src/createrepo_c.c:643:72: note: format string is defined here
643 | g_warning(" Sourced from location: \'%s\', build timestamp: %ld%s",
| ~~^
| |
| long int
| %lld
Created attachment 4964 [details]
proposed fix.
Verified with 4.3 M2 RC2 (poky git rev: 3eff0eb5ea77de20d85a2ffc64652579cbd7755c) |