Bug 12731 - Camera-ui hangs while shooting a photo
: Camera-ui hangs while shooting a photo
Status: UNCONFIRMED
Product: Maemo 5 Community SSU
camera-ui
: testing
: N900 Maemo
: Unspecified major with 1 vote (vote)
: ---
Assigned To: unassigned
: general
:
:
:
:
  Show dependency tree
 
Reported: 2014-04-27 16:30 UTC by Marcin Mielniczuk
Modified: 2014-07-21 08:18 UTC (History)
1 user (show)

See Also:


Attachments
dmesg log (45.51 KB, text/x-log)
2014-07-21 08:09 UTC, Marcin Mielniczuk
Details
Gdb output (5.17 KB, text/x-log)
2014-07-21 08:15 UTC, Marcin Mielniczuk
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Marcin Mielniczuk (reporter) 2014-04-27 16:30:04 UTC
SOFTWARE VERSION: 
(Settings > General > About product)
CSSU Thumb 21.2011.38-1Tmaemo9.1+thumb0
camera-ui 1.1.29.2+0cssu17+thumb0

EXACT STEPS LEADING TO PROBLEM: 
(Explain in detail what you do (e.g. tap on OK) and what you see (e.g. message
Connection Failed appears))
1. Take a photo
2. The capturing preview (not the actual photo's preview) remains

EXPECTED OUTCOME: The photo should be taken and shown

ACTUAL OUTCOME: The photo isn't taken, camera-ui hangs and cannot be closed
normally (has to be killed), the capture preview remains frozen

REPRODUCIBILITY: 
between 1/10 and 2/10

EXTRA SOFTWARE INSTALLED: cl-launcher, flashlight, decoders-support, 720p
codecs

OTHER COMMENTS: How in world can I obtain a camera-ui log?
Comment 1 Marcin Mielniczuk (reporter) 2014-07-12 07:54:03 UTC
Found the way how to increase reproducibility. This problems happens especially
when there are more apps open. E.g. my testing case was: mstardict with a
couple of big (>4MB while compressed) dictionaries, gtranslate, a web page
open. With similar conditions, the third photo failed.
Comment 2 Ivaylo Dimitrov 2014-07-19 08:54:09 UTC
I just took 10 pictures in a row, while microb was loading FB background and
gtranslate was opened. All pictures were taken just fine and appeared in the
gallery. CSSU and camera-ui are the same versions as yours, swap is on uSD,
device uptime is ~ 4 days.

Could you try to install latest libc6 from cssu-thumb repo by hand and see if
you still can reproduce the issue?
Comment 3 Marcin Mielniczuk (reporter) 2014-07-19 10:40:23 UTC
libc6 is 2.5.1-1eglibc27+0m5+cssu2.1
I opened: 
* Easy Debian Fremantle beta testing in MicroB
* Modest with Inbox with many (>100) e-mails
* Web window
* Open Media Player with ~ 80 tracks in the queue
* mstardict with ~ 15 dictionaries loaded, one entry open
* gTranslate

5th photo failed. If minimized, a part of the photo is shown. The screenshot,
though, shows a black window. camera-ui uses 5.9% RAM and 0.0% CPU (according
to top) while hanging. The 5th photo was NOT saved.

camera-ui is 1.1.29.2+0cssu17+thumb0
720p playback, cl-launcher, flashlight apps are NOT installed. Swap on uSD set
up by swapset. Flopswap NOT used. Of the bg processes: psswitcher,
advanced-clock-plugin, advanced-power, 3g2g & simple-brightness applets in the
status menu. Swappolube tweaked settings. Catoriseplus. Kernel power v52,
profile dsp @ 805 MHz. BusyBox Power. All updates from extras-devel &
cssu-thumb installed. OMP is thumb, from gidzzz's repo. Uptime is 19:43. Saving
to uSD (maybe this is the cause?). 

How to obtain the log? This might give a clue.
Comment 4 Ivaylo Dimitrov 2014-07-19 11:58:48 UTC
Is there anything suspicious in syslog/dmesg? could you attach those here?

Also, you may want to install -dbg symbols for relevant packages (camera-ui,
libc6, libglib, etc...), gdb from extras-devel (it is newer than the one in SDK
and groks thumb-compiled binaries), attach gdb to camera-ui and get a backtrace
when it is hanged.
Comment 5 Marcin Mielniczuk (reporter) 2014-07-19 13:56:53 UTC
Well, it doesn't work:

(gdb) r
Starting program: /usr/bin/camera-ui 
<spitting out libthread_db stuff>
method return sender=:1.222 -> dest=:1.220 reply_serial=2
method return sender=:1.47 -> dest=:1.224 reply_serial=2
sh: write error: Invalid argument
sh: write error: Invalid argument

Or is does camera-ui have to be debugged in another way?
Comment 6 Ivaylo Dimitrov 2014-07-19 21:45:49 UTC
Yes, you should attach gdb to a running camera-ui. gdb command is "attach $PID"
Comment 7 Marcin Mielniczuk (reporter) 2014-07-20 12:50:49 UTC
Attached gdb to camera-ui

...
Loaded symbols for /usr/lib/libiptcdata.so.0
0x4018b798 in poll () from /lib/libc.so.6
(gdb) bt
#0  0x4018b798 in poll () from /lib/libc.so.6
#1  0x402e0376 in g_main_context_poll (n_fds=8, fds=0x24e248, 
    timeout=<optimized out>, context=0x99230, priority=<optimized out>)
    at /home/maemo/workspace/thumb/T-maemo8.3-thumb2/glib/glib/gmain.c:2926
#2  g_main_context_iterate (context=0x99230, block=<optimized out>, 
    dispatch=1, self=Unhandled dwarf expression opcode 0xfa
)
    at /home/maemo/workspace/thumb/T-maemo8.3-thumb2/glib/glib/gmain.c:2608
#3  0x402e08d0 in IA__g_main_loop_run (loop=0x24e2f0)
    at /home/maemo/workspace/thumb/T-maemo8.3-thumb2/glib/glib/gmain.c:2821
#4  0x404b7c06 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#5  0x413af8dc in main () from /usr/bin/camera-ui.launch
#6  0x0000a400 in _start ()
(gdb) continue
Continuing.
[Thread 0x4310d490 (LWP 3286) exited]
[Thread 0x4356c490 (LWP 3284) exited]
[Thread 0x439c4490 (LWP 3287) exited]
[New Thread 0x439c4490 (LWP 3293)]
[New Thread 0x4356c490 (LWP 3294)]
[New Thread 0x4310d490 (LWP 3295)]
[Thread 0x439c4490 (LWP 3293) exited]
[New Thread 0x439c4490 (LWP 3296)]
[Thread 0x4356c490 (LWP 3294) exited]
[New Thread 0x4356c490 (LWP 3297)]
[New Thread 0x44f84490 (LWP 3298)]
[New Thread 0x452ff490 (LWP 3299)]
[Thread 0x44f84490 (LWP 3298) exited]
[Thread 0x452ff490 (LWP 3299) exited]
[Thread 0x439c4490 (LWP 3296) exited]
[New Thread 0x439c4490 (LWP 3302)]
[Thread 0x4310d490 (LWP 3295) exited]
[New Thread 0x4310d490 (LWP 3303)]

At this point camera-ui hung. No log outputs, warnings, errors, only gdb
talking about threads.
Comment 8 Ivaylo Dimitrov 2014-07-20 17:39:52 UTC
Are you sure you did install gdb from extras-devel. As this "self=Unhandled
dwarf expression opcode 0xfa" makes me think you did not. gdb version must be
3.7.1 for you to be able to debug gcc4.7.2-compiled binaries:

http://maemo.org/packages/package_instance/view/fremantle_extras-devel_free_armel/gdb/7.3.1-0maemo1+0m5/

Anyway, after you attach to camera-ui and c(ontinue), you should break(ctrl-c)
into debugger *after* camera-ui has hung. Also, I will need the result of "info
threads" command. That way we will have the backtrace of the hung function.
Furthermore, you can switch to all of the threads(thread n) and get backtraces.

BTW I still don't see your syslog/dmesg log attached.
Comment 9 Marcin Mielniczuk (reporter) 2014-07-20 19:15:07 UTC
Yes, it's 7.3.1-debian

I'll do the rest soon.
Comment 10 Marcin Mielniczuk (reporter) 2014-07-21 08:09:05 UTC
Created an attachment (id=3483) [details]
dmesg log

Output of `dmesg > ~/dmesg.log`
Comment 11 Marcin Mielniczuk (reporter) 2014-07-21 08:15:26 UTC
Created an attachment (id=3484) [details]
Gdb output
Comment 12 Marcin Mielniczuk (reporter) 2014-07-21 08:18:04 UTC
Syslog isn't present in /var/log on N900

$ ls /var/log
autodisconnect.log         maemo-optify-boottime.log
fsck_home.log              pycentral.log

What's interesting, I did two photos very quickly and the second failed. (I
even half-pressed the shutter to dismiss the preview)

One more important thing: There's nothing on device from the meecolay repo.