Bug 1551747
Summary: | Can't read gvfs/gphoto2 filesystem: Error: Failed to get folder list: -1: Unspecified error | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Michael Mráka <mmraka> | ||||||||
Component: | libgphoto2 | Assignee: | Josef Ridky <jridky> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Desktop QE <desktop-qa-list> | ||||||||
Severity: | high | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 7.5 | CC: | dmardones, gerrit.slomma, jkoten, jkucera, mattias.ohlsson, mmraka, ovasik, riehecky, toracat, tpelka | ||||||||
Target Milestone: | rc | Keywords: | Patch, Regression | ||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | libgphoto2-2.5.15-2.el7 | Doc Type: | If docs needed, set a value | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2019-08-06 13:03:58 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Michael Mráka
2018-03-05 21:33:16 UTC
We updated libgphoto2 to libgphoto2-2.5.15-1.el7 in rhel7.5, would you mind checking this new version? Note that couple of other components were updated too, see https://errata.devel.redhat.com/advisory/30790 (In reply to Tomas Pelka from comment #1) > We updated libgphoto2 to libgphoto2-2.5.15-1.el7 in rhel7.5, would you mind > checking this new version? This is the broken version reported in comment #0. Nothing changed in gphoto2 backend between gvfs-gphoto2.x86_64 0:1.30.4-5.el7 and gvfs-gphoto2.x86_64 0:1.30.4-3.el7. This error comes from gp_camera_folder_list_folders, so something had to change in libgphoto2. I can't reproduce with my camera, but it is probably because it does not use folders... It would be good to try with gphoto2 cmd utils (see --list-folders and --debug options). Changing component to libgphoto2. old version (libgphoto2-2.5.2-5.el7.x86_64) $ gphoto2 --list-folders There is 1 folder in folder '/'. - store_00010001 There is 1 folder in folder '/store_00010001'. - DCIM There are 2 folders in folder '/store_00010001/DCIM'. - 126___02 - 127___03 There are 0 folders in folder '/store_00010001/DCIM/126___02'. There are 0 folders in folder '/store_00010001/DCIM/127___03'. new version (libgphoto2-2.5.15-1.el7.x86_64) $ gphoto2 --list-folders There is 1 folder in folder '/'. - store_deadbeef There is 1 folder in folder '/store_deadbeef'. - DCIM *** Error *** PTP Invalid Storage ID *** Error (-1: 'Unspecified error') *** For debugging messages, please use the --debug option. Debugging messages may help finding a solution to your problem. If you intend to send any error or debug messages to the gphoto developer mailing list <gphoto-devel.net>, please run gphoto2 as follows: env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --list-folders Please make sure there is sufficient quoting around the arguments. Created attachment 1405049 [details]
debug logfile
Debug info obtained using
$ env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --list-folders
There is 1 folder in folder '/'.
- store_deadbeef
There is 1 folder in folder '/store_deadbeef'.
- DCIM
*** Error ***
PTP Invalid Storage ID
*** Error (-1: 'Unspecified error') ***
Created attachment 1447268 [details]
gphoto2 debug log file
I'm seeing the same problem with my two Canon cameras. I have uploaded a debug file. I have rebuilt libgphoto2 using the 2.5.17 tar file. The issue seems to be fixed in this version. $ gphoto2 --list-folders There is 1 folder in folder '/'. - store_00010001 There is 1 folder in folder '/store_00010001'. - DCIM There are 20 folders in folder '/store_00010001/DCIM'. - 124___02 - 126___04 - 127___05 - 128___06 - 129___07 etc. Thanks for it. I'll check changes between 2.5.15 and 2.5.17 and prepare patch with solution. (In reply to Josef Ridky from comment #10) > Thanks for it. I'll check changes between 2.5.15 and 2.5.17 and prepare > patch with solution. Any update on this? I see that RHEL 8 beta has 2.5.16. I don't (yet) know if this works or not. Hello Michael, could you please provide also a log for successful cases? I'm curious for whats going on in - libgphoto2-2.5.2-5.el7.x86_64 - libgphoto2 using the 2.5.17 tar file From the inspection of the log previously attached, I am deducing that there is something wrong with the device info obtained from camera ("Supported operations:" list should not be empty). Created attachment 1534950 [details]
debug from working version
Hello Jiri,
here is the log using libgphoto2-2.5.2-5.el7.x86_64 obtained by
$ env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --list-folders
There is 1 folder in folder '/'.
- store_00010001
There is 1 folder in folder '/store_00010001'.
- DCIM
There is 1 folder in folder '/store_00010001/DCIM'.
- 137___01
There are 0 folders in folder '/store_00010001/DCIM/137___01'.
I don't have access to libgphoto2 2.5.17 version.
Thank you Michael! Finally, I found it. In libgphoto2-2.5.15, the problem was that ptp_unpack_string from camlibs/ptp2/ptp-pack.c returns prematurely if the length of string is 0 and leave data to which 'len' points untouched: https://github.com/gphoto/libgphoto2/blob/230b2433ee567676c779a7a1ac021f061288cfff/camlibs/ptp2/ptp-pack.c#L143 Since len points to an uninitialized local variable, it contains random data and hence the nonsensical device output in logs, concretely: - in your previous log, it contains 0x1 and hence it treats the Supported operations array's size (0x42) as Functional Mode - in Akemi Yagi's log, it contains 0x1f (if I computed it rightly), and hence the 'Functional Mode: 0x901c' (offset 0x53 from the beginning of received USB packet) As we can see, libgphoto2-2.5.2 has no such a problem: https://github.com/gphoto/libgphoto2/blob/21984d946125e411d72d002907c8038ba7984b74/camlibs/ptp2/ptp-pack.c#L134 Simply said, this bug has been caused by a regression introduced by refactoring of ptp_unpack_string somewhere between libgphoto2-2.5.2 and libgphoto2-2.5.15. This patch from libgphoto2-2.5.16 should fix the problem: https://github.com/gphoto/libgphoto2/commit/d8f6ec8c1a03572f638cfca44a2ee48cccb8c465.patch Hi Jiri, Thanks for identifying the patch. I applied it to libgphoto2-2.5.15 and confirm that it does fix the problem. *** Bug 1676681 has been marked as a duplicate of this bug. *** Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:2194 |