maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [Announce] kernel-power stable v53 in Extras Testing (https://talk.maemo.org/showthread.php?t=94287)

justmemory 2019-01-21 08:19

Re: [Announce] kernel-power stable v53 in Extras Testing
 
Quote:

Originally Posted by Halftux (Post 1553014)
These glib errors are not really helpful, but I would guess it is some plugin or other library which are used by fcamera, which produces this error. I would say it is not fcamera or the driver itself. So recompiling these packages could help and would be the next step. Could you list the packages which you have in mind?

To get a clue and track down what cause this error you need to debug the application with gdb.

To get a break at the glib critical error use gdb like described here.

You need to install gdb on the device and propably the related debug packages of the packages which are used/linked by fcamera.

The journey continues, don't give up.


Yeah... googling the errors did not help, so that is why I thought that it is maybe a solution to compile other packages - not to mention that you suggested and hoped that if I'm lucky maybe I would not have to... :) Apparently I do have to... :) So thanks again for your suggestions and links, I shall try... Giving up on tweaking n900...? Never... :D

I was thinking about these packages btw. (fcamera depends on these, and these packages are depending on libc6 and/or libglib2.0): Libjpeg62 6b-9osso6+0m5, Libpulse0 0.9.15-1maemo27+0m5, Libqt4-core 4.5.3~git20090723-0maemo4+0m5, Libqt4-gui 4.5.3~git20090723-0maemo4+0m5, Libstdc++6 4.6.1-maemo6.

Update 20190122:// Now that I investigate it more I do not find source packages for those...

justmemory 2019-01-21 21:12

Re: [Announce] kernel-power stable v53 in Extras Testing
 
So... Here is the output gdb gave me:

Code:

fcamera[2273]: GLIB CRITICAL ** GLib-GObject - g_object_get: assertion `G_IS_OBJECT (object)' failed
aborting...

Program received signal SIGABRT, Aborted.
0x40ff097c in raise () from /lib/libc.so.6
0x40ff097c <raise+64>:        cmn        r0, #4096        ; 0x1000

So it is libc6 but I don't know why...

Running fcamera from terminal says:

Code:

FCam Error: Error creating daemon setter thread: -1
Update 20190122:// I converted the two libc.so.6 (i.e. the 2.5.1 and the 2.10 version) with hexdump and made a diff between the two ("made a patch file"); it gave me a 146357 line "patch" file so yeah, there are differences...
I tried to recover the line in question (i.e. 2273) from fcamera executable but I really do not know how to do that (converting does not help; tried with hexdump, xxd; even tried with strings command). It would be good to know which part of the source code gave that particular line but... I do not know how to do that or even if it is possible at all (maybe we could identify which part of the code causes that GLib error). Now I'm stuck again... :)

Halftux 2019-01-22 19:39

Re: [Announce] kernel-power stable v53 in Extras Testing
 
@justmemory

I think gdb raises this sigabort with help of libc. So it was initiate by yourself.

To get more information you need to recompile fcamera without code optimization, so without -O2 and activate debug information -g or -g3. Furthermore you should avoid to strip your binary.

If you are in doubt please post your makefile. The binary get stripped by dpkg, when compiling a deb file (rules: dh_strip). So don't make a deb only compile fcamera with right gcc flags and copy the binary.

For gcc flags it could be enough to change in the project file:

Code:

line 44: CONFIG += release warn_on
to

Code:

CONFIG += debug warn_on
After the change you need to generate the makefile again and compiling. Try to run it again with gdb and see if you get more informations.

justmemory 2019-01-23 09:46

Re: [Announce] kernel-power stable v53 in Extras Testing
 
1 Attachment(s)
Quote:

Originally Posted by Halftux (Post 1553064)
If you are in doubt please post your makefile.

After modifying fcamera.pro generated Makefile with qmake and issued build command. This made fcamera executable in build/ folder. After I run that with gdb it throws out just the same output as described before - only the line changed from 2273 to 11826.

Code:

fcamera[11826]: GLIB CRITICAL ** GLib-GObject - g_object_get: assertion `G_IS_OBJECT (object)' failed
aborting...

Program received signal SIGABRT, Aborted.
0x40ff097c in raise () from /lib/libc.so.6
0x40ff097c <raise+64>:        cmn        r0, #4096        ; 0x1000

I attached my Makefile :)

I run with these commands:
- in terminal:
Code:

gdb --args path_to_fcamera G_DEBUG=fatal-warnings G_DEBUG=fatal-criticals
- inside gdb:
Code:

set env G_DEBUG=fatal-criticals
then
Code:

run

freemangordon 2019-01-23 13:10

Re: [Announce] kernel-power stable v53 in Extras Testing
 
gdb backtrace?

justmemory 2019-01-24 10:34

Re: [Announce] kernel-power stable v53 in Extras Testing
 
Quote:

Originally Posted by freemangordon (Post 1553090)
gdb backtrace?

Run the earlier command and now the line changed to 25826...

Executing backtrace command inside gdb it says:

Code:

#0  0x40ff097c in raise () from /lib/libc.so.6
#1  0x40ff4b8c in abort () from /lib/libc.so.6
#2  0x40ff4b8c in abort () from /lib/libc.so.6

... and the line above continues till #98 where I skip it...

One other thing: I installed the previously built fcamera deb package to my other n900 which has libc version 2.5.1 and it runs without any issue... For me it is strange because that version was built against libc version 2.10 so I do not understand how can that be that it could run on that device if it does not on the other... As I understand from fcamera code it uses pthread, open, fprint and other libc6 related stuff but I can't imagine that would be a problem.

On the other side Halftux said that maybe i should compile other related packages (libjpeg62 for example) but I cannot find source for those... Should I try with debian versions...?


Update:// OK, I think I made a step forward (I do not understand what the errors might mean though - since I'm not very familiar with C language). In the FCam API (i.e. fcam-dev source) there are examples. So I simply gave the make command for example1 and run it. It did not gave glib errors but had the daemon setter creating error so I run it with gdb. The message from that is:
Code:

0x400649f0 in sem_wait () from /lib/libpthread.so.0
0x400649f0 <sem_wait+236>:      mov      r7,  r0

Backtrace info:
Code:

#0  0x400649f0 in sem_wait () from /lib/libpthread.so.0
#1  0x00023008 in FCam::TSQueue<FCam::N900::_Frame*>::pull()  ()
#2  0x0021ce8 in FCam::N900::Sensor::getFrame()  ()
#3  0x000b1d8 in main (argc=3, argv=0xbec184b4) at example1.cpp:42

Update2:// Maybe I'm total ridiculous but from the code and all... just like it could not handle the sensor of the n900...

Halftux 2019-01-28 15:59

Re: [Announce] kernel-power stable v53 in Extras Testing
 
@justmemory that is something.
For investigating the problem I need to study the source code from libc and libglibc. Looks like the problem is deep in the system and thread related.

Can you post what packages and in which order you already recompiled them against the new libc?

justmemory 2019-01-28 20:37

Re: [Announce] kernel-power stable v53 in Extras Testing
 
Quote:

Originally Posted by Halftux (Post 1553240)
Can you post what packages and in which order you already recompiled them against the new libc?

@Halftux
First I recompiled fcam-drivers then fcamera. For only building fcamera I installed fcam-dev but since I did not find the libs and headers I downloaded the fcam-dev source and specified the FCam directory in the .pro file.

Quote:

Originally Posted by Halftux (Post 1553240)
For investigating the problem I need to study the source code from libc and libglibc.

Should I upload those here? I mean the source of my libc6-2.10 and libglib... Btw. I used libglib version 2.24 source found in CSSU-devel repo since the 2.20 version always failed to compile. Since on CSSU Testing there is version 2.24 I don't think it is a problem or does it?

t-b 2019-12-21 22:56

Re: [Announce] kernel-power stable v53 in Extras Testing
 
Hi - having troubles installing kernel power.

Transferred an old backup to a 'new' N900 with backup menu. That has stock kernel, so used HAM to install the kernel-power-flasher. Seemed to work fine, but after restarting the old kernel is still active (uname -a -> 2.6.28-omap1 #PREEMPT )

Also tried to uninstall and install a few times https://wiki.maemo.org/Kernel_Power#...g_kernel-power
Every time the same result. Any suggestions?

t-b 2019-12-22 13:51

Re: [Announce] kernel-power stable v53 in Extras Testing
 
Solved it.

First apt-get install --reinstall -y kernel-power kernel-power-modules
rebooted and then
apt-get install --reinstall -y kernel-power-flasher
rebooted again

now uname -a results in 2.6.28.10-omap1-power53 #PREEMPT...


All times are GMT. The time now is 18:25.

vBulletin® Version 3.8.8