Uploaded image for project: ' AGL Development'
  1. AGL Development
  2. SPEC-2393

random software crashes on the raspberry pi - possibly compiler bug

XMLWordPrintable

    • Raspberry Pi 3

      Trying to run pipewire on a raspberry pi 3, using guppy as a base, I got a "Bus Error" on a call to strncpy() inside pipewire.

      Debugging a bit, it looks like the crash happens in a function that reads:

      static const char default_device[] = "hw:0";
      static const uint32_t default_min_latency = 16;
      static const uint32_t default_max_latency = 1024;
      
      
      static void reset_props(struct props *props)
      {
              strncpy(props->device, default_device, 64);
              props->min_latency = default_min_latency;
              props->max_latency = default_max_latency;
      }

      and in assembly the program counter stops right after a neon instruction:

         0x763279a0 <impl_init+464>:	str	r5, [r4, #96]	; 0x60
         0x763279a4 <impl_init+468>:	vst1.8	{d8-d9}, [r2 :64]
      => 0x763279a8 <impl_init+472>:	mov	r2, #64	; 0x40
         0x763279ac <impl_init+476>:	str	lr, [r4, #128]	; 0x80
         0x763279b0 <impl_init+480>:	strd	r10, [r4, #144]	; 0x90
      

      Recompiling pipewire with exactly the same compiler flags, using linaro gcc 7.4.1-2019.02-x86_64_arm-linux-gnueabihf completely fixes the crash.

      I have also observed similar crashes in:

      • the Dashboard app (crashes while starting)
      • the Mixer app (crashes while starting)
      • the Radio app using RTL-SDR (the RTL-SDR helper crashes when you hit play)

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            gkiagia Georgios Kiagiadakis
            gkiagia Georgios Kiagiadakis
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: