Project

General

Profile

Actions

Bug #1237

closed

imrest-app is exiting without waiting for any contacts.

Added by Hammel about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
General
Target version:
Start date:
16 Oct 2025
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

Pressing the pair icon in launcher runs imrest-app but that app exits nearly immediately and the launcher icon never changes to enabled.\

$ imrest-app -v5
Verbosity level: 5
main[imrest.c:318] INFO No log file configured.
main[imrest.c:328] INFO Running as the app.
pairApp[pair-app.c:104] INFO imrest-app is exiting.

Related issues

Related to Sensors - Feature #1077: Add pair button to UIRejectedHammel15 Nov 2023

Actions
Actions #1

Updated by Hammel about 1 month ago

  • Description updated (diff)
Actions #2

Updated by Hammel about 1 month ago

The imrest-app is just a notifier that tells imrest daemon to enable pair mode.
I need to verify pair.c:pairApp() is called and send the message to the daemon.
I then need to verify imrest is receiving the message in watcher.c:watcherProcessor()

piboxLogger(LOG_INFO, "Toggling pairing state.\n");

It's possible that this block of code needs to be enabled for this to work.

#if 0
        /*
         * Read message, but ignore it's content (at least for now).
         * This is required so select() doesn't think there is more I/O ready.
         */
        while ( read(sd, buf, sizeof buf) > 0 )
            ;
#endif

Actions #3

Updated by Hammel about 1 month ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10
Actions #4

Updated by Hammel about 1 month ago

The problem appears to be that the imrest daemon is run via init as root, but launcher is not root so when it runs imrest-app the latter is run as nobody.
The local socket, /var/run/imrest.sock, used to signal between the app and daemon is root/root 755, which means the user nobody can't write to it.
Appmgr runs imrest-app so it can be privileged via the config. That should fix this problem, I believe.

Actions #5

Updated by Hammel about 1 month ago

  • Status changed from In Progress to Closed
  • % Done changed from 10 to 100

Verified and fixed.
Tested on hardware and it's working.
Code committed and pushed.
Closing issue.

Actions #6

Updated by Hammel about 1 month ago

Actions

Also available in: Atom PDF