qemu-img convert is freezing for some DMG files.

Bug #1809304 reported by Julio Faracco
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

Recently, I created a file using hdiutil from MacOS (using Zlib compression):

$ hdiutil create -volname MyVolName -srcfolder /path/to/my/vol/ -ov -format UDZO myvolname.dmg

But, when I try to convert this volume using qemu-img convert, this command is freezing.

I'm using the upstream version to test it.

It is freezing inside the binary search method to retrieve the chunk.

But, I still don't know why.

I'm attaching the file as an example.

It can be mounted using MacOS or other Linux apps like hfsleuth and darling-dmg.

Tags: qemu-img dmg
Revision history for this message
Julio Faracco (jcfaracco) wrote :
Revision history for this message
yuchenlin (npes87184) wrote :
Revision history for this message
Julio Faracco (jcfaracco) wrote :

I'm almost sure that we need other improvements beyond fixing binary search deadlock.

It is returning read errors when you apply your patch.

Revision history for this message
yuchenlin (npes87184) wrote :

Because of lacking zero chunk table, reading zero sector will return EIO.
I have submitted a series to fix this problem.

Please refer to this series: http://lists.nongnu.org/archive/html/qemu-devel/2018-12/msg05637.html

Thanks,
Yu-Chen Lin

Revision history for this message
Julio Faracco (jcfaracco) wrote :

Hi Yu-Chen.

The series looks good. It fixed the problems related to zero chunk. Nice work!

I added a comment that I reviewed your patch considering my scenarios here. At least, It contributes to merge your changes.

Revision history for this message
Julio Faracco (jcfaracco) wrote :

Additional info: tested with version 3.0.0. So, before pushing my commits. Conclusion: This is not a new bug.

Changed in qemu:
status: New → Fix Committed
Revision history for this message
Thomas Huth (th-huth) wrote :

Since QEMU 4.0 has been released now, I assume we can close this ticket as "Fix released"? Or is there still anything left to do here?

Revision history for this message
yuchenlin (npes87184) wrote :

I re-test the dmg img with QEMU 4.0 again, and it works.

In my opinion, the bug can be closed as "Fix released".

Thanks.

Revision history for this message
Thomas Huth (th-huth) wrote :

Thanks for testing. So I'm marking this now as "Fix released".

Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.