Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#41766 - [ser2net] daemon just exists without any error message, workaround exists

Attached to Project: Community Packages
Opened by Christian Vogel (vogelchr) - Sunday, 31 August 2014, 09:42 GMT
Last edited by Sergej Pupykin (sergej) - Tuesday, 03 March 2015, 14:39 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

=========
= Bug
=========

I have ser2net installed on a x86_64 machine. When I start the daemon using the package supplied systemd service unit, it immediately exits.

My configuration is attached to this bug-report, it's basically the stock configuration, with all active ports commented out, and one "raw" port added for my GPS. The same behavior has been observed on x86_64 and archlinux-arm (on a Raspberry-Pi, used as a cheap console server).

> $ sudo systemctl status ser2net
> ● ser2net.service - Proxy that allows tcp connections to serial ports
> Loaded: loaded (/usr/lib/systemd/system/ser2net.service; disabled)
> Active: inactive (dead)
>
> Aug 31 11:23:11 optiplex systemd[1]: Starting Proxy that allows tcp connec.....
> Aug 31 11:23:11 optiplex ser2net[19897]: ser2net startup
> Aug 31 11:23:11 optiplex systemd[1]: Started Proxy that allows tcp connect...s.
> Hint: Some lines were ellipsized, use -l to show in full.

The precise version the bug was observed on is this package on x86_64...

> $ sha1sum /var/cache/pacman/pkg/ser2net-2.8rc3-3-x86_64.pkg.tar.xz
> 7fc99e20fdc0b411cc6e85112feff18ed4985c37 /var/cache/pacman/pkg/ser2net-2.8rc3-3-x86_64.pkg.tar.xz

and, on the raspberrypi...

> $ sha1sum /var/cache/pacman/pkg/ser2net-2.8rc3-3-armv6h.pkg.tar.xz
> 1677b97111f7aa0732f67a5d1f8acd45adc310f5 /var/cache/pacman/pkg/ser2net-2.8rc3-3-armv6h.pkg.tar.xz


============
= Workaround
============

When I tell ser2net not do daemonize (-n), and change the systemd unit file to "type=simple" (which, afaik, is the prefered way to run daemons nowadays anyway, isn't it?) then everything works in a stable manner.

> --- a/ser2net.service
> +++ b/ser2net.service
> @@ -3,8 +3,8 @@ Description=Proxy that allows tcp connections to serial ports
> After=syslog.target network.target
>
> [Service]
> -Type=forking
> -ExecStart=/usr/bin/ser2net
> +Type=simple
> +ExecStart=/usr/bin/ser2net -n

> $ sudo systemctl status ser2net
> ● ser2net.service - Proxy that allows tcp connections to serial ports
> Loaded: loaded (/usr/lib/systemd/system/ser2net.service; disabled)
> Active: active (running) since Sun 2014-08-31 11:26:34 CEST; 3s ago
> Main PID: 20094 (ser2net)
> CGroup: /system.slice/ser2net.service
> └─20094 /usr/bin/ser2net -n
>
> Aug 31 11:26:34 optiplex systemd[1]: Started Proxy that allows tcp connect...s.
> Hint: Some lines were ellipsized, use -l to show in full.


I haven't looked into the actual cause for the premature exit, because the fix is that simple. I propose to change the ser2net package to incorporate it.
This task depends upon

Closed by  Sergej Pupykin (sergej)
Tuesday, 03 March 2015, 14:39 GMT
Reason for closing:  Fixed
Additional comments about closing:  changed to type=simple

Loading...