Opened 5 days ago

Last modified 2 days ago

#19171 new bug

avrdude crashes after every run

Reported by: danboid Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Device Kit Version: R1/beta5
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I have installed avrdude under Haiku b5 amd64. I have tried using my USB AVR ISPMKII programmer to program my Uzebox and it does work but it crashes at the end of every run.

I have attached a core dump from avrdude after one of these crashes.

Attachments (2)

avrdude-442-debug-19-02-2024-08-15-15.report (11.4 KB ) - added by danboid 4 days ago.
avrdude crash report
avrdude-433-debug-20-02-2024-04-04-47.report (16.2 KB ) - added by danboid 3 days ago.

Download all attachments as: .zip

Change History (19)

comment:1 by danboid, 5 days ago

The core dump was 12 MB when compressed with xz -9 so I'd need to split it to share it on here.

comment:2 by waddlesplash, 5 days ago

Just attach the report, please. But odds are this a bug in the avrdude port and not Haiku itself.

comment:3 by korli, 4 days ago

or a bug in libusb.

comment:4 by danboid, 4 days ago

Yes was unsure about where to post this tbh but I thought better post it somewhere than not raise it at all. Sorry if this is a packaging bug or whatever which I suppose is just as likely.

I have split that beautiful coredump for you.

This crash not only happens after every run of avrdude, I've also seen it on two different machines, a laptop and a desktop both running b5.

comment:5 by danboid, 4 days ago

You should be able to uncompress those split files using the command:

cat Haiku-avrdude-usb-core.tar* | tar xvf -

comment:6 by korli, 4 days ago

danboid, I think waddlesplash asked to just attach the crash report.

comment:7 by waddlesplash, 4 days ago

Indeed, I don't want the core file.

by danboid, 4 days ago

avrdude crash report

comment:8 by waddlesplash, 4 days ago

Component: Drivers/USB/XHCIKits/Device Kit
Owner: changed from waddlesplash to nobody

Could be a bug either in libusb or the USB Kit, not immediately clear from the report.

comment:9 by danboid, 4 days ago

I dunno if it helps you at all but the avrdude command I'm using is:

avrdude -c avrispmkII -P usb -p m644 -U flash:w:Bootloader5.hex

See https://uzebox.org/wiki/Avrdude

Haiku is almost the optimal platform for Uzebox devs. I think it would be if we could fix this.

It is arguably easier to build the Uzebox repo under Haiku than Linux because I can install Haiku faster than most if not all Linux distros, Windows and so much faster than macOS its not worth mentioning.

https://uzebox.org/wiki/Haiku_Software_Installation

comment:10 by waddlesplash, 3 days ago

Can you please try with the guarded heap?

LD_PRELOAD=libroot_debug.so MALLOC_DEBUG=g program...

comment:11 by danboid, 3 days ago

Prefixing avrdude with

LD_PRELOAD=libroot_debug.so MALLOC_DEBUG=g

Didn't stop it from crashing after running.

comment:12 by waddlesplash, 3 days ago

I meant to generate a new debug report and attach it here with the guarded heap; it should crash in a different place and/or with a different message.

comment:13 by danboid, 3 days ago

New debug report attached. Please excuse the incorrect date.

comment:14 by waddlesplash, 3 days ago

There does appear to be at least one issue with the USB Kit here at least.

comment:15 by pulkomandy, 3 days ago

I have not seen crashes in a while, but I think I don't own an avrispmk2 compatible device. So maybe I didn't test this specific combination and avrdude is working fine with other programmer types (I use mainly an stk500 development board, and lufa bootloader these days)

comment:16 by waddlesplash, 3 days ago

PulkoMandy: can you try with the guarded heap with one of the devices you do have and see if a similar crash occurs anyway?

comment:17 by pulkomandy, 2 days ago

The stk500 is accessed through a serial port and doesn't use libusb. I'll see if I can find and test one of my devices using a bootloader

Note: See TracTickets for help on using tickets.