Ticket #831 (closed defect: wontfix)

Opened 12 years ago

Last modified 11 years ago

moko_gsmd_connection_init should check for multiple instances

Reported by: hrw@… Owned by: mickeyl
Priority: high Milestone:
Component: openmoko-libs Version:
Severity: normal Keywords:
Cc: buglog@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

Currently during X11 start there are two applications started which want to
connect to gsmd: dialer and GSM applet. When they can not connect they restart
/etc/init.d/gsmd script. So during X11 start we have two restarts of gsmd in
nearly same time so common result is that one of them does not connect (or even
both).

Change History

comment:1 Changed 12 years ago by hrw@…

NOTE: package curl-7.16.4-r0: task do_fetch: started
NOTE: curl-7.16.4: http://curl.haxx.se/download/curl-7.16.4.tar.bz2 has no entry
in conf/checksums.ini, not checking URI
NOTE: package curl-7.16.4-r0: task do_fetch: completed
NOTE: package curl-7.16.4-r0: task do_unpack: started
NOTE: Unpacking /home/hrw/devel/sources/dl_dir/curl-7.16.4.tar.bz2 to
/home/hrw/devel/build/openmoko/tmp/work/armv4t-angstrom-linux-gnueabi/curl-7.16.4-r0/
NOTE: package curl-7.16.4-r0: task do_unpack: completed
NOTE: package curl-7.16.4-r0: task do_patch: started
NOTE: package curl-7.16.4-r0: task do_patch: completed
NOTE: package curl-7.16.4-r0: task do_configure: started
NOTE: package curl-7.16.4-r0: task do_configure: completed
NOTE: package curl-7.16.4-r0: task do_qa_configure: started
NOTE: Checking sanity of the config.log file
NOTE: package curl-7.16.4-r0: task do_qa_configure: completed
NOTE: package curl-7.16.4-r0: task do_compile: started
NOTE: package curl-7.16.4-r0: task do_compile: completed
NOTE: package curl-7.16.4-r0: task do_install: started
NOTE: package curl-7.16.4-r0: task do_install: completed
NOTE: package curl-7.16.4-r0: task do_package: started
NOTE: DO PACKAGE QA
NOTE: Checking Package: curl-dbg
NOTE: Checking Package: curl
NOTE: Checking Package: curl-doc
NOTE: Checking Package: curl-dev
NOTE: Checking Package: curl-locale
NOTE: Checking Package: curl-certs
NOTE: Checking Package: libcurl
NOTE: Checking Package: libcurl-dev
NOTE: Checking Package: libcurl-doc
NOTE: DONE with PACKAGE QA
NOTE: package curl-7.16.4-r0: task do_package: completed
NOTE: package curl-7.16.4-r0: task do_package_write_ipk: started
Packaged contents of curl-dbg into
/home/hrw/devel/build/openmoko/tmp/deploy/glibc/ipk/armv4t/curl-dbg_7.16.4-r0_armv4t.ipk
Packaged contents of curl into
/home/hrw/devel/build/openmoko/tmp/deploy/glibc/ipk/armv4t/curl_7.16.4-r0_armv4t.ipk
Packaged contents of curl-doc into
/home/hrw/devel/build/openmoko/tmp/deploy/glibc/ipk/armv4t/curl-doc_7.16.4-r0_armv4t.ipk
Packaged contents of curl-dev into
/home/hrw/devel/build/openmoko/tmp/deploy/glibc/ipk/armv4t/curl-dev_7.16.4-r0_armv4t.ipk
NOTE: Not creating empty archive for curl-locale-7.16.4-r0
Packaged contents of curl-certs into
/home/hrw/devel/build/openmoko/tmp/deploy/glibc/ipk/armv4t/curl-certs_7.16.4-r0_all.ipk
Packaged contents of libcurl into
/home/hrw/devel/build/openmoko/tmp/deploy/glibc/ipk/armv4t/libcurl4_7.16.4-r0_armv4t.ipk
Packaged contents of libcurl-dev into
/home/hrw/devel/build/openmoko/tmp/deploy/glibc/ipk/armv4t/libcurl-dev_7.16.4-r0_armv4t.ipk
Packaged contents of libcurl-doc into
/home/hrw/devel/build/openmoko/tmp/deploy/glibc/ipk/armv4t/libcurl-doc_7.16.4-r0_armv4t.ipk
NOTE: package curl-7.16.4-r0: task do_package_write_ipk: completed
NOTE: package curl-7.16.4-r0: task do_package_write: started
NOTE: package curl-7.16.4-r0: task do_package_write: completed
NOTE: package curl-7.16.4-r0: task do_populate_staging: started
NOTE: package curl-7.16.4-r0: task do_populate_staging: completed
NOTE: package curl-7.16.4-r0: task do_qa_staging: started
NOTE: QA checking staging
ERROR: QA issue: libstartup.la failed sanity test (reference to workdir or
installed)
ERROR: QA issue: libshowdesktop.la failed sanity test (reference to workdir or
installed)
ERROR: QA issue: libwindowselector.la failed sanity test (reference to workdir
or installed)
ERROR: QA issue: liblauncher.la failed sanity test (reference to workdir or
installed)
ERROR: QA issue: libsystray.la failed sanity test (reference to workdir or
installed)
ERROR: QA issue: libclock.la failed sanity test (reference to workdir or installed)
ERROR: QA issue: libbattery.la failed sanity test (reference to workdir or
installed)
NOTE: package curl-7.16.4-r0: task do_qa_staging: completed
NOTE: package curl-7.16.4-r0: task do_build: started
NOTE: package curl-7.16.4-r0: task do_build: completed

comment:2 Changed 12 years ago by hrw@…

oops, wrong window ;( please ignore comment #1

comment:3 Changed 12 years ago by alex@…

I have locally implemented a solution using semaphores, and I submitted the idea
in order to have feedbacks from harald or community, but the only feedback I got
for now is the Koen's one that is suggesting to use DBus as IPC mechanism
between libgsmd and gsmd.
Can Harald gives his opinion on that in order to 'trigger' the development of an
enhanced IPC mechanism ?

comment:4 Changed 12 years ago by mickey@…

I think the stack should look like that:

gsmd - talking to the modem
libgsmd - multiplexing connections
libgsmd-dbus - exporting the dbus interface

[ mokogsmdconnection then talking via dbus instead of directly to libgsmd ]

That way, libgsmd retains being usable on systems without dbus.

comment:5 Changed 12 years ago by alex@…

So that would still requires that the libgsmd is somehow safely re-establishing
the connection to the gsmd daemon if it was restarted. I thought that it was
easily implementable with dbus. But it is more 'difficult' or 'tricky' without.
Because the lib should take into account gsmd disconnections, wait for the gsmd
to be alive again, and then re-open the connection. All of these being taken
into account in the dbus architecture if I understood well the design.

comment:6 Changed 12 years ago by gnu@…

Howabout something simpler? If the GUI stuff can't talk to gsmd, they just fail
temporarily, and they try again whenever you poke at them to do something. This
would be far superior to having each of them try to kill and restart the daemon!!!

Right now it tries to connect when it starts up, and if it fails (and fails to
kill and restart) then the app just fails forever; it never tries to reconnect
e.g. when the user asks to turn on the GSM or power up the antenna.

Then just adding a simple way to start and stop daemons in the GUI (e.g. one
more item in neod that runs /etc/init.d/[something] [start|stop|restart]) would
let people circumvent bugs that crash daemons. At worst, people could use the
terminal for this.

comment:7 Changed 12 years ago by balrogg@…

The issue here and with #385 is identical to that of starting X and its
first clients on any distro. It would be enough for the init scripts to make
sure that gsmd is ready to accept clients before starting the GSM applet and the
dialer, for example by making gsmd fork only after making the socket available,
or by making gsmd execute appropriate session scripts. Similarly rerunning gsmd
on a crash can happen in the init scripts like restarting xinit by the gdm.

comment:8 Changed 11 years ago by tick@…

  • Owner changed from mickey@… to tick@…

comment:9 Changed 11 years ago by tick@…

  • Status changed from new to assigned

comment:10 Changed 11 years ago by tick@…

  • Owner changed from tick@… to erin_yueh@…
  • Status changed from assigned to new

comment:11 Changed 11 years ago by tick@…

  • Owner changed from erin_yueh@… to mickey@…

comment:12 Changed 11 years ago by roh

  • Owner changed from mickey@… to mickeyl

comment:13 Changed 11 years ago by mickeyl

  • Status changed from new to closed
  • Version current svn head deleted
  • Resolution set to wontfix

libmokogsmd is dead.

Note: See TracTickets for help on using tickets.