Manjaro-arm-flasher 0.10-1 ungraceful end when target device is corrupt

Known after failure: SD card in mmcblk0 is corrupt

Flasher downloads the requested image and prompts to continue. When dismissing the panel to begin writing to the target, flasher hangs leaving and unresponsive panel.

Oct 29 09:21:42 python3[2019]: Traceback (most recent call last):
                                                  File "/usr/local/bin/manjaro-arm-flasher", line 823, in showFlashComplete
                                                    print( self.flashProc.readAll().data().decode( "utf8" ).strip() )
                                                RuntimeError: wrapped C/C++ object of type QProcess has been deleted
Oct 29 09:21:44 systemd-coredump[2606]: [🡕] Process 2019 (manjaro-arm-fla) of user 1000 dumped core.
                                                         Module with build-id a68d7e932e10d1108e6e2f3c5a7b2bb32ba1f4c9
                                                         Module with build-id 01f261872ea1815a9f4906c1a6b5a6f5f0c39e15
                                                         Module with build-id 214207d96fb434794b73b406a1b0be6b4c999935
                                                         Module with build-id 19a49fc02c1792af04af32b34bb4bccff820baa3
                                                         Module with build-id 6c01237f7d14ad9cea47f26d465caa8698a7d3ea
                                                         Module with build-id 7b04c33881a5856b4772580959fb03ca224ddb02
                                                         Module with build-id bb7058f5ed47bb3eea0a0787373dbe5951200b3d
                                                         Module with build-id 03dd9e5cb57e38505a8ef49e32e1871c4e4f75f4
                                                         Module with build-id 4d3519bec62821560a76e699c333c1386fd0dfc7
                                                         Module with build-id 6dc376458c81fa38c38f3b431a6ffbfa7bd908a5
                                                         Module with build-id ee65ba17aa37a5ff7c078c0f49b94b1073b2d272
                                                         Module with build-id fd3eebe76aaada751c48d7ba6ebdfb97385d5969
                                                         Module with build-id ee6ac28bca148d5d77084fe59a194117e84e5dc2
                                                         Module with build-id 1a39d277bd47d721f3f59f0d11ad1c7f7a46c137
                                                         Module with build-id 3483457e18c6c0650fe757bdae539ac9c8c32425
                                                         Module with build-id 03811b207a5d6542b4c8b4bc4cf8a63971707806
                                                         Module with build-id 1c25d9db5d01a7cf038e4cd88ce51205c04c9e16
                                                         Module with build-id 757f3fbd74e852f741eb72294914b30dba5c284f
                                                         Module with build-id 5d7dd03ff33610cab450d70877ec7199c07217d7
                                                         Module with build-id 8c5500ed5b0619d82fa12157c52288a02fc02fcc
                                                         Module with build-id 6cfbe0876f1bc39b27c0c1dda5d6b337445ebb2e
                                                         Module with build-id 8eff85b77a549cd0f1cfff13cbd0112d94790041
                                                         Module with build-id 7241facc8924753fec7f1ee97447c2cda3afcb75
                                                         Module with build-id cd094d37daca0f473ddb0114a4d4e12bbf586bfb
                                                         Module with build-id 6e61f620dc5f1521bc1159776bbaf8960e788670
                                                         Module with build-id 35ef7f0f5e1b88ce575cb73a17fba95cba7c76fc
                                                         Module with build-id 10dbc9fe8b79e5f116d4a1189060ad5e3e035459
  Kernel: 5.15.74-2-MANJARO-ARM-RPI arch: aarch64 bits: 64 compiler: gcc
    v: 12.1.0 parameters: coherent_pool=1M 8250.nr_uarts=0
    snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1
    video=HDMI-A-1:1920x1080M@60 video=HDMI-A-2:1920x1080M@60
    smsc95xx.macaddr=DC:A6:32:80:5B:D6 vc_mem.mem_base=0x3eb00000
    vc_mem.mem_size=0x3ff00000 root=PARTUUID=e56efd08-02 rw rootwait
    console=ttyS0,115200 console=tty3 selinux=0 quiet splash
    plymouth.ignore-serial-consoles smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0
    kgdboc=ttyS0,115200 usbhid.mousepoll=8 audit=0
  Desktop: Xfce v: 4.16.1 tk: Gtk v: 3.24.34 info: xfce4-panel wm: xfwm
    v: 4.16.1 vt: 7 dm: LightDM v: 1.32.0 Distro: Manjaro ARM base: Arch Linux
  Type: ARM System: Raspberry Pi 4 Model B Rev 1.2 details: BCM2835
    rev: c03112 serial: <filter>
  Message: No system battery data found. Is one present?
  RAM: total: 3.78 GiB used: 1.75 GiB (46.4%) gpu: 64 MiB
  RAM Report: missing: Required tool dmidecode not installed. Check
  Info: model: N/A variant: cortex-a72 bits: 64 type: MCP arch: ARMv8
    family: 8 model-id: 0 stepping: 3
  Topology: cpus: 1x cores: 4 smt: N/A cache: L1: 320 KiB desc: d-4x32 KiB;
    i-4x48 KiB L2: 1024 KiB desc: 1x1024 KiB
  Speed (MHz): avg: 600 min/max: 600/1500 scaling: driver: cpufreq-dt
    governor: schedutil cores: 1: 600 2: 600 3: 600 4: 600 bogomips: 432
  Features: asimd cpuid crc32 evtstrm fp
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass status: Vulnerable
  Type: spectre_v1 mitigation: __user pointer sanitization
  Type: spectre_v2 status: Vulnerable
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
  Device-1: bcm2711-hdmi0 driver: vc4_hdmi v: N/A bus-ID: N/A
    chip-ID: brcm:fef00700 class-ID: hdmi
  Device-2: bcm2711-hdmi1 driver: vc4_hdmi v: N/A bus-ID: N/A
    chip-ID: brcm:fef05700 class-ID: hdmi
  Device-3: bcm2711-vc5 driver: vc4_drm v: N/A bus-ID: N/A chip-ID: brcm:gpu
    class-ID: gpu
  Display: x11 server: v: compositor: xfwm v: 4.16.1 driver:
    X: loaded: modesetting alternate: fbdev dri: vc4
    gpu: vc4-drm,vc4_crtc,vc4_dpi,vc4_dsi,vc4_firmware_kms,vc4_hdmi,vc4_hvs,vc4_txp,vc4_v3d,vc4_vec
    display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 3840x1115 s-size: <missing: xdpyinfo>
  Monitor-1: HDMI-A-1 mapped: HDMI-1 pos: primary,bottom-l
    model: Acer K242HYL serial: <filter> built: 2020 res: 1920x1080 hz: 60
    dpi: 93 gamma: 1.2 size: 527x296mm (20.75x11.65") diag: 604mm (23.8")
    ratio: 16:9 modes: max: 1920x1080 min: 720x400
  Monitor-2: HDMI-A-2 mapped: HDMI-2 pos: top-right model: Acer K242HYL
    serial: <filter> built: 2020 res: 1920x1080 hz: 60 dpi: 93 gamma: 1.2
    size: 527x296mm (20.75x11.65") diag: 604mm (23.8") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  Message: Unable to show GL data. Required tool glxinfo missing.
  Device-1: bcm2711-hdmi0 driver: vc4_hdmi bus-ID: N/A chip-ID: brcm:fef00700
    class-ID: hdmi
  Device-2: bcm2711-hdmi1 driver: vc4_hdmi bus-ID: N/A
    chip-ID: brcm:fef05700 class-ID: hdmi
  Device-3: bcm2835-audio driver: bcm2835_audio bus-ID: N/A
    chip-ID: brcm:bcm2835_audio class-ID: bcm2835_audio
  Sound API: ALSA v: k5.15.74-2-MANJARO-ARM-RPI running: yes
  Sound Server-1: JACK v: 1.9.21 running: no
  Sound Server-2: PulseAudio v: 16.1 running: yes
  Sound Server-3: PipeWire v: 0.3.59 running: no
  Device-1: bcm2835-mmc driver: mmc_bcm2835 v: N/A port: N/A bus-ID: N/A
    chip-ID: brcm:fe300000 class-ID: mmcnr
  IF: wlan0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: bcm2711-genet-v5 driver: bcmgenet v: N/A port: N/A bus-ID: N/A
    chip-ID: brcm:fd580000 class-ID: ethernet
  IF: eth0 state: down mac: <filter>
  WAN IP: <filter>
  Device-1: pl011 driver: uart_pl011 bus-ID: N/A chip-ID: arm:fe201000
    class-ID: serial
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
  Device-2: pl011 driver: N/A bus-ID: N/A chip-ID: arm:serial0
    class-ID: serial
  Report: This feature requires one of these tools: hciconfig/bt-adapter
  Message: No logical block device data found.
  Message: No RAID data found.
  Local Storage: total: 232.89 GiB used: 55.56 GiB (23.9%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 type: USB vendor: Kingston model: SA2000M8250
    size: 232.89 GiB block-size: physical: 4096 B logical: 512 B type: N/A
    serial: <filter> rev: 0209 scheme: MBR
  Message: No optical or floppy data found.
  ID-1: / raw-size: 232.65 GiB size: 228.92 GiB (98.40%) used: 55.5 GiB
    (24.2%) fs: ext4 dev: /dev/sda2 maj-min: 8:2 label: ROOT_MNJRO
    uuid: 08bf4a63-4efc-4d7d-b81c-6f4e72f24c8f
  ID-2: /boot raw-size: 213.6 MiB size: 213.4 MiB (99.89%) used: 54.8 MiB
    (25.7%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: BOOT_MNJRO
    uuid: BABE-65BB
  Kernel: swappiness: 60 (default) cache-pressure: 80 (default 100)
  ID-1: swap-1 type: zram size: 5.57 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
  Message: No unmounted partitions found.
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 1 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 1-1:2 info: VIA Labs Hub ports: 4 rev: 2.1 speed: 480 Mb/s
    power: 100mA chip-ID: 2109:3431 class-ID: 0900
  Hub-3: 1-1.1:3 info: VIA Labs VL820 Hub ports: 4 rev: 2.1 speed: 480 Mb/s
    chip-ID: 2109:2820 class-ID: 0900
  Device-1: 1-1.1.1:4 info: Lite-On USB Keyboard type: Keyboard
    driver: hid-generic,usbhid interfaces: 1 rev: 1.1 speed: 1.5 Mb/s
    power: 70mA chip-ID: 04ca:0022 class-ID: 0301
  Device-2: 1-1.1.2:5 info: Pixart Imaging Optical Mouse type: Mouse
    driver: hid-generic,usbhid interfaces: 1 rev: 1.1 speed: 1.5 Mb/s
    power: 100mA chip-ID: 093a:2510 class-ID: 0301
  Hub-4: 2-0:1 info: Super-speed hub ports: 4 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-5: 2-1:2 info: VIA Labs VL820 Hub ports: 4 rev: 3.1 speed: 5 Gb/s
    chip-ID: 2109:0820 class-ID: 0900
  Device-1: 2-1.3:3 info: JMicron / USA JMS567 SATA 6Gb/s bridge
    type: Mass Storage driver: uas interfaces: 1 rev: 3.2 speed: 5 Gb/s
    power: 896mA chip-ID: 152d:0562 class-ID: 0806 serial: <filter>
  System Temperatures: cpu: 43.3 C mobo: N/A
  Fan Speeds (RPM): N/A
  Processes: 201 Uptime: 22m Init: systemd v: 251 default: graphical
  tool: systemctl Compilers: gcc: 12.1.0 clang: 14.0.6 Packages: pm: pacman
  pkgs: 782 libs: 223 tools: pamac Shell: Bash v: 5.1.16
  running-in: xfce4-terminal inxi: 3.3.22

So this error was seen when trying to write to a broken SD card?

Trying to understand it, as I have not experienced it.

Yes. After manjaro-arm-flasher choked, trying to mount the SD with fdisk revealed the corruption. Obviously flasher can’t fix a bad card, but it shouldn’t quit and dump.

Edit: Everything went smoothly with a good SD card. At least as far as getting the system on the target drive.

How would you expect it to react, when it can’t write where you tell it too?

Might be a good idea to open an issue on the gitlab repository for the application:

A message indicating why it failed would be nice. Not hanging and doing a dump for an easily anticipated problem would be nice. Not leaving an unresponsive panel presented would be nice. These things used to be rather expected of a well functioning application.

Issue logged with GitLab repo for manjaro-arm-flasher

1 Like

The manjaro-arm-flasher developer has marked my submission as an enhancement action. I would have thought core-dump stops classify as a bug, but at least it’s marked for future consideration.

It’s marked as an enhancement, because the request is about better error reporting/handling when the application fails. Not to fix it failing, as it’s expected to fails if it can’t write to the device.

Better error handling? You are charitable to consider a core-dump stop and an unresponsive panel as error handling. I believe I am the expert concerning what the request is about, since I wrote it. I will fully accept that effort wasn’t explicit enough to prevent misunderstanding. I consider the idea of the flasher app somehow “fixing” a corrupt SD card as absurd, so absurd I didn’t think that point needed stating. Also, I wouldn’t consider the flasher app reporting the target device can’t be written as an application failure; the media failed, not the app. However, I do consider a reproducible stop with core-dump to be an application failure, a failure to have error handling in place to trap and report the event causing the unexpected stop. I don’t really care how the request is labeled, I just hope the problem gets fixed.

Sure, but if the core dump happens because the SD card can’t be written too, then it would be nice of the application to tell the user that in an error dialog, instead of just core dumping. That’s what I mean with better error handling.

Right now we don’t even know exactly why it dumps the core in that situation. We need to understand that first, before we can fix it.

Well, a runtime error identified as wrapped C/C++ object of type QProcess has been deleted and thrown at line 823, in showFlashComplete when executing print( self.flashProc.readAll().data().decode( “utf8” ).strip() ) seems like a promising place to start. Good luck!