Image Location: https://autobuilder.yocto.io/pub/releases/yocto-4.3_M2.rc1/machines/beaglebone-yocto/ Poky git rev: f73ae292bc0b92df3cb76c6e8b220f18630f6bc7 Steps: 1. Deploy rootfs image and boot up. 2. Install createrepo-c: $ rpm -ivh createrepo-c-0.21.1-r0.cortexa8hf_neon.rpm 3. Run creatrepo_c to create a local repo: $ mkdir localrepo $ createrepo_c ./localrepo Directory walk started Directory walk done - 0 packages Temporary output repo path: ./localrepo/.repodata/ Preparing sqlite DBs Pool started (with 5 workers) Pool finished Segmentation fault This issue happens on beaglebone-yocto and qemuarm. I also tested on qemux86-64 and qemuarm64, there is no such issue.
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.
https://git.yoctoproject.org/poky/commit/?id=5e7bf2a17d888bf2a8afcbbbd92269d873e7422c
Verified with 4.3 M2 RC2 (poky git rev: 3eff0eb5ea77de20d85a2ffc64652579cbd7755c)