|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
occasional application crashes, usually at launch
Hello again, jggimi and friends.
I'm on OpenBSD 6.4-stable amd64. Once or twice a day (depending on how much time I spend on my laptop) an application will crash on me, usually immediately after launch. What I observe is the application's window existing for a split second, then disappearing. Re-launching the application almost always proceeds without incident. No applications are immune--it happens to GTK as well as Qt apps, in MATE as well as in LXQt--and the timing seems completely random. Until yesterday this was just cosmetic, but yesterday it happened to an app while I was working in it (causing lost work) so I finally decided to investigate. My installation is very basic. I just installed a desktop environment, installed my favorite applications, and enabled a handful of additional services (hotplugd, xenodm, apmd). That's it. Specifically, I have not enabled or disabled any security features. I realize this is very little information, but was hoping that someone will recognize it and know the cause/fix. I will be happy to provide more information, and will start collecting coredumps (which up until now I've been deleting). |
|
|||
Thank you for the advice, jggimi.
1. The crashes are sporadic and unpredictable, so always opening applications in the terminal (as opposed to keyboard shortcuts) is not practical. On the bright side, a lot of applications running without an associated terminal send their stdout and stderr to ~/.xsession-errors, so I'll keep an eye on that file and will also save coredumps. 2. Good thought. I'm already in the staff login class. Bummer. jggimi, can you take a look at this link: https://www.c0ffee.net/blog/openbsd-on-a-laptop/ In the Initial Configuration section, are the changes for /etc/login.conf and /etc/sysctl.conf really needed? |
|
||||
I find the default staff values sufficient for my workstation needs. But I'm not a "power" user from an application resource perspective.
If any of these applications leave core dumps, you may find gdb(1) or devel/gdb (the executable is /usr/local/bin/egdb) helpful for problem diagnosis. |
|
|||
I don't need a lot of resources, either. So I'll just go along with the staff settings.
They do leave core dumps. I'll keep them around next time and will poke them to see if they tell anything useful. I didn't know there was both a base system gdb(1) and ports gdb (devel/gdb). Thanks for the tip. I'll use both tools to get as much information as possible. |
|
|||
I collected some cordumps, but inspecting them didn't yield anything useful. Just the usual "Segmentation fault".
However, I did notice a pattern with the applications that crash: They are all GUI apps that I sometimes run as regular user, sometimes run as root with doas(1). The real breakthrough came when I noticed that after running the apps with doas, I couldn't change application preferences as regular user because the owner of the configuration files in ~/.config was mysteriously changed to root. So everything pointed to a problem with doas's environment. After much head scratching, I found that the solution was to change my /etc/doas.conf from this: Code:
permit nopass keepenv bruno permit nopass keepenv root Code:
permit nopass keepenv setenv { USER=root HOME=/root DISPLAY=:0.0 XAUTHORITY=/home/bruno/.Xauthority } bruno permit nopass keepenv root Code:
find /home/bruno -user root | xargs doas chown bruno P.S. The punchline is that the apps were crashing when running as regular user after running as root, because they couldn't write to their own config files. Last edited by brudan; 4th April 2019 at 05:37 PM. |
|
||||
Interesting!
Glad you got the problem resolved. You may want to share your findings with the Project. Two ways I can think of: starting on informal discussion on the misc@ mailing list, or submitting a diff(1) against src/etc/examples/doas.conf to the tech@ mailing list for consideration. If the second is of any interest, time is of the essence to get the change into 6.5; the ports tree was just locked a couple of hours ago. |
|
|||
Good idea! I opted for the informal option: https://tinyurl.com/yxwehet7
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Russia Wants to Launch Backup DNS System by August 1, 2018 | e1-531g | News | 2 | 1st December 2017 10:47 AM |
Changes to dates of launch of new releases? | betweendayandnight | OpenBSD General | 1 | 12th August 2016 10:28 PM |
Tomorrow is World IPv6 Launch Day | J65nko | News | 1 | 5th June 2012 04:21 PM |
World IPv6 Launch on 6 June | J65nko | News | 0 | 19th January 2012 11:57 PM |
How launch script or command from icewm? | aleunix | General software and network | 8 | 8th June 2008 09:12 PM |