Re: shutdown stopping obsdfreqd on thinkpad x230
Hi, from the systems point of view 'obsdfreqd' is just a service. Seeing it being stopped on shutdown is expected and normal. As for apmd, my system prints while booting: starting local daemons: apmd cron. While halting, no message of stopping local daemons is printed. Not seeing that message seems to be expected behavior on your system. Regarding crashes, have you tried renewing the heatsink compound on your CPU? Have you checked the RAM? > Apologies, i am realising the ofreqbsd message is because it is the > only pkg daemon that needs shutting down? i think this is because of a > hardware problem with the charging port, is there any ways i can run > diagnostics on this? > Cheers, > Freddie > > On Sun, 11 Feb 2024 13:31:11 + > freddie bubble wrote: > > > Hi! > >I have a thinkpad x230 running openbsd 7.4 and recently have been > >having more frequent crashes, there is nothing consistent about > > the crashes other than maybe the laptop is plugged into power as it > > is most of the time. looking around online this seems to be to do > > with the interaction between apmd and ofreqbsd. apmd has the -L > > flag set and ofreqbsd has -T 75,55. When my computer turns off the > > only message i can see before the shutdown sequence starts is that > > it is or has stopped obsdfreqd. I wonder if it is because apmd is > >starting after ofreqbsd? i can only see ofreqbsd when i 'rcctl > >order.' Really sorry if this is not enough information for any > > help as this is my first post here in years. Hope you are all well > > :)) > > > > Cheers, > > Freddie > -- greetings, Florian Viehweger
10gbps pf nat firewall ix to mcx
huh, after i migrated nat fw from 82599 (ix) with LRO on (default) to a CX4121A (mcx) flashed to latest nvidia firmware and now i'm getting 900mbps on single tcp throughput (endpoints still using lro on em and ix) and very consistently getting close to the full 1gbps thruoghput on single tcp connections now instead of slower and slightly varying results. guess i should go back and test ix with LRO off on the pf box.
shutdown stopping obsdfreqd on thinkpad x230
Hi! I have a thinkpad x230 running openbsd 7.4 and recently have been having more frequent crashes, there is nothing consistent about the crashes other than maybe the laptop is plugged into power as it is most of the time. looking around online this seems to be to do with the interaction between apmd and ofreqbsd. apmd has the -L flag set and ofreqbsd has -T 75,55. When my computer turns off the only message i can see before the shutdown sequence starts is that it is or has stopped obsdfreqd. I wonder if it is because apmd is starting after ofreqbsd? i can only see ofreqbsd when i 'rcctl order.' Really sorry if this is not enough information for any help as this is my first post here in years. Hope you are all well :)) Cheers, Freddie
Re: shutdown stopping obsdfreqd on thinkpad x230
Apologies, i am realising the ofreqbsd message is because it is the only pkg daemon that needs shutting down? i think this is because of a hardware problem with the charging port, is there any ways i can run diagnostics on this? Cheers, Freddie On Sun, 11 Feb 2024 13:31:11 + freddie bubble wrote: > Hi! >I have a thinkpad x230 running openbsd 7.4 and recently have been >having more frequent crashes, there is nothing consistent about the >crashes other than maybe the laptop is plugged into power as it is >most of the time. looking around online this seems to be to do with >the interaction between apmd and ofreqbsd. apmd has the -L flag set >and ofreqbsd has -T 75,55. When my computer turns off the only >message i can see before the shutdown sequence starts is that it >is or has stopped obsdfreqd. I wonder if it is because apmd is >starting after ofreqbsd? i can only see ofreqbsd when i 'rcctl >order.' Really sorry if this is not enough information for any help >as this is my first post here in years. Hope you are all well :)) > > Cheers, > Freddie
update to virtio_vmmci for linux 6.6 guests in vmd
Just cut a new release to fix building virtio_vmmci [1] on Linux guests. This is my port of vmmci(4) to Linux to allow Linux guests in vmd(8) safely shutdown when stopping vmd and also synchronize/update their rtc's if you suspend/hibernate and then resume the host machine. Not to be confused with vmm_clock [2], which is a port of pvclock(2) and Linux's kvm-clock driver to provide paravirtualized clocksource. If you run a Linux guest with a 6.6 or newer kernel, try out the latest virtio_vmmci. If it doesn't compile, please ping me. Patches or PRs appreciated as well...but I don't watch GH activity much so be sure to ping me. -dv [1] https://github.com/voutilad/virtio_vmmci/releases/tag/0.6.0 [2] https://github.com/voutilad/vmm_clock
Re: httpd generating: read_errdoc entries in syslog
On Sat, Feb 10, 2024 at 06:21:03PM -0500, J Doe wrote: > In /var/www I have created: > > /err root:daemon chmod 0755 > > Within /var/www/err I have created: > > err.html www:www chmod 0444 > > In my httpd.conf I have a global configuration that points to this: > > /etc/httpd.conf > . . . > errdocs "/err" > > When I cause an error with httpd, the error document template I have > created gets rendered to the client, but I get entries in syslog like > the following: > > serv1 httpd[23368]: read_errdoc: open: No such file or directory > > This also happens if a create a copy of err.html and name it 404.html. > > How can I modify my configuration to stop the: read_errdoc entries in > syslog ? > > Thanks, > > - J > This is probably not a configuration error. As far as I can see, the following line in server_http.c cause the problem: if ((body = read_errdoc(srv_conf->errdocroot, cstr)) == NULL && (body = read_errdoc(srv_conf->errdocroot, HTTPD_ERRDOCTEMPLATE) == NULL) The read_errdoc function tries to open the file (.html first, then err.html) and writes the syslog message, if the file can't be found. (If none can be found a default body is created. I attach a diff, which fixes the issue for me. This is the first diff I submit, so anybody with more experience is welcome to improve or reject it. Carsten Index: server_http.c === RCS file: /cvs/src/usr.sbin/httpd/server_http.c,v retrieving revision 1.153 diff -u -p -u -p -r1.153 server_http.c --- server_http.c 21 Sep 2022 05:55:18 - 1.153 +++ server_http.c 11 Feb 2024 12:11:27 - @@ -893,6 +893,7 @@ server_abort_http(struct client *clt, un char buf[IBUF_READ_SIZE]; char*escapedmsg = NULL; char cstr[5]; + char*path; ssize_t bodylen; if (code == 0) { @@ -974,10 +975,21 @@ server_abort_http(struct client *clt, un if ((size_t)snprintf(cstr, sizeof(cstr), "%03u", code) >= sizeof(cstr)) goto builtin; - if ((body = read_errdoc(srv_conf->errdocroot, cstr)) == NULL && - (body = read_errdoc(srv_conf->errdocroot, HTTPD_ERRDOCTEMPLATE)) - == NULL) + if (asprintf(&path, "%s/%s.html", srv_conf->errdocroot, cstr) == -1) + fatal("asprintf"); + + if (access(path, R_OK) == 0) { + if ((body = read_errdoc(srv_conf->errdocroot, cstr)) == NULL) { + free(path); + goto builtin; + } + } + else if ((body = read_errdoc(srv_conf->errdocroot, +HTTPD_ERRDOCTEMPLATE)) == NULL) { + free(path); goto builtin; + } + free(path); body = replace_var(body, "$HTTP_ERROR", httperr); body = replace_var(body, "$RESPONSE_CODE", cstr);
Re: Screenshotting using PrtScr in cwm?
On Sun, Feb 11, 2024 at 10:34:52AM +0100, Omar Polo wrote: > I can reproduce here. Laptop' print key works, the USB keyboard one > doesn't. On PS/2 keyboards the print screen key and the pause/break key have special behaviour when operating in set 2. On USB keyboards print screen is basically just a regular key. I did some tests here with a native PS/2 keyboard and the same keyboard connected via this USB to PS/2 adaptor: 0a81:0205 CHESEN, PS2 to USB Converter Connected via PS/2, xev reports the print screen keypress. Connected via USB, it does not. Modifying wskbd_translate() in wskbd.c and adding a printf() call to dump the value of 'value', (great choice of variable name), we can see the following behaviour on the console, (not in X): PS/2 Print Screen: Press: 0xAA 0xB7 Release: 0xB7 0xAA Scroll lock: Press: 0x46 Release: 0x46 Pause/break Press: 0x7F 0x7F Release: nothing SysRq, (I.E. shifted Print Screen) Press: [code of the shift key itself, E.G. 0x36 or 0x2A] 0xB7 Release: 0xB7 [code of the shift key itself] USB Print Screen: Press: 0x46 Release: 0x46 Scroll lock: Press: 0x47 Release: 0x47 Pause/Break Press: 0x48 0x48 Release: nothing SysRq, (I.E. shifted Print Screen) Press: [code of the shift key, E.G. 0xE5] 0x46 Release: 0x46 [code of the shift key] ... which is all what I would have expected.
Re: httpd generating: read_errdoc entries in syslog
On Sat, Feb 10, 2024 at 06:21:03PM -0500, J Doe wrote: > > In /var/www I have created: > > /err root:daemon chmod 0755 > > Within /var/www/err I have created: > > err.html www:www chmod 0444 > > In my httpd.conf I have a global configuration that points to this: > > /etc/httpd.conf > . . . > errdocs "/err" > > When I cause an error with httpd, the error document template I have > created gets rendered to the client, but I get entries in syslog like > the following: > > serv1 httpd[23368]: read_errdoc: open: No such file or directory > > This also happens if a create a copy of err.html and name it 404.html. > > How can I modify my configuration to stop the: read_errdoc entries in > syslog ? > > Thanks, > > - J > This is not a configuration error. The following line in server_http.c cause the problem: if ((body = read_errdoc(srv_conf->errdocroot, cstr)) == NULL && (body = read_errdoc(srv_conf->errdocroot, HTTPD_ERRDOCTEMPLATE) == NULL) The read_errdoc function tries to open the file (.html first, then err.html) and writes the syslog message, if the file can't be found. I attach a diff, which fixes the issue for me. This is the first diff I submit, so anybody with more experience is welcome to improve or reject it. Index: server_http.c === RCS file: /cvs/src/usr.sbin/httpd/server_http.c,v retrieving revision 1.153 diff -u -p -u -p -r1.153 server_http.c --- server_http.c 21 Sep 2022 05:55:18 - 1.153 +++ server_http.c 11 Feb 2024 12:11:27 - @@ -893,6 +893,7 @@ server_abort_http(struct client *clt, un char buf[IBUF_READ_SIZE]; char*escapedmsg = NULL; char cstr[5]; + char*path; ssize_t bodylen; if (code == 0) { @@ -974,10 +975,21 @@ server_abort_http(struct client *clt, un if ((size_t)snprintf(cstr, sizeof(cstr), "%03u", code) >= sizeof(cstr)) goto builtin; - if ((body = read_errdoc(srv_conf->errdocroot, cstr)) == NULL && - (body = read_errdoc(srv_conf->errdocroot, HTTPD_ERRDOCTEMPLATE)) - == NULL) + if (asprintf(&path, "%s/%s.html", srv_conf->errdocroot, cstr) == -1) + fatal("asprintf"); + + if (access(path, R_OK) == 0) { + if ((body = read_errdoc(srv_conf->errdocroot, cstr)) == NULL) { + free(path); + goto builtin; + } + } + else if ((body = read_errdoc(srv_conf->errdocroot, +HTTPD_ERRDOCTEMPLATE)) == NULL) { + free(path); goto builtin; + } + free(path); body = replace_var(body, "$HTTP_ERROR", httperr); body = replace_var(body, "$RESPONSE_CODE", cstr);
Re: -current firefox segfault: pledge "", syscall 289
I'm not seeing this in firefox, but in kdevelop when creating a new project (hit the finish button to finally do it). Not hte pledge issue, but the tmp dir thing remarkable xterm output running kdevelop & sysctl() call failed with code 22 sysctl() call failed with code 22 sysctl() call failed with code 0 QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user' kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Spawn.PermissionsInvalid" "The permission of the setuid helper is not correct" kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Spawn.PermissionsInvalid" "The permission of the setuid helper is not correct" kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Spawn.PermissionsInvalid" [etc, then lots of WARNINGS] kdevelop:/usr/local/llvm16/lib/../lib/libLLVM-16.so: /usr/lib/libLLVM.so.8.0 : WARNING: symbol(_ZTVNSt3__110__function6__funcIN4llvm2cl3optINS2_17PassSummaryActionELb0ENS3_6parserIS5_EEEUlRKS5_E_ENS_9allocatorISB_EEFvSA_EEE) size mismatch, relink your program : CommandLine Error: Option 'help-list' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options gdb /usr/local/bin/kdevelop kdevelop.core: GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-unknown-openbsd7.4"... (no debugging symbols found) Core was generated by `kdevelop'. Program terminated with signal 6, Aborted. Reading symbols from /usr/lib/libpthread.so.27.1...done. Loaded symbols for /usr/lib/libpthread.so.27.1 [many things work well] Reading symbols from /usr/local/lib/libavahi-client.so.0.2...done. Loaded symbols for /usr/local/lib/libavahi-client.so.0.2 Reading symbols from /usr/libexec/ld.so...Error while reading shared library symbols: Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so] [many things work well again] Reading symbols from /usr/lib/libcurses.so.15.0...done. Loaded symbols for /usr/lib/libcurses.so.15.0 #0 thrkill () at /tmp/-:2 2 /tmp/-: No such file or directory. in /tmp/- backtrace: #0 thrkill () at /tmp/-:2 #1 0x1dd61efc52c4b45b in ?? () #2 0x0b710f5d6d72 in _libc_abort () at /usr/src/lib/libc/stdlib/abort.c:51 #3 0x0b71b79e1744 in llvm::report_fatal_error () from /usr/local/llvm16/lib/../lib/libLLVM-16.so #4 0x0b71b79e157d in llvm::report_fatal_error () from /usr/local/llvm16/lib/../lib/libLLVM-16.so #5 0x0b71b79cc66f in (anonymous namespace)::CommandLineParser::addOption () from /usr/local/llvm16/lib/../lib/libLLVM-16.so #6 0x0b71b79bf060 in (anonymous namespace)::CommandLineParser::registerSubCommand () from /usr/local/llvm16/lib/../lib/libLLVM-16.so #7 0x0b71b79d08a4 in llvm::object_creator<(anonymous namespace)::CommandLineParser>::call () from /usr/local/llvm16/lib/../lib/libLLVM-16.so #8 0x0b71b7a2628b in llvm::ManagedStaticBase::RegisterManagedStatic () from /usr/local/llvm16/lib/../lib/libLLVM-16.so #9 0x0b71b79c9003 in llvm::cl::OptionCategory::OptionCategory () from /usr/local/llvm16/lib/../lib/libLLVM-16.so #10 0x0b71b79bed6e in llvm::cl::getGeneralCategory () from /usr/local/llvm16/lib/../lib/libLLVM-16.so #11 0x0b71b7b4773c in _ZN4llvm2cl3optIbLb0ENS0_6parserIbEEEC2IJA13_cNS0_4descENS0_11initializerIbEENS0_12OptionHiddenDpRKT_ () from /usr/local/llvm16/lib/../lib/libLLVM-16.so #12 0x0b71b7b501d1 in _GLOBAL__sub_I_DIBuilder.cpp () ---Type to continue, or q to quit--- from /usr/local/llvm16/lib/../lib/libLLVM-16.so #13 0x0b7108be0989 in ?? () from /usr/libexec/ld.so #14 0x0005 in ?? () #15 0x592ba000 in ?? () #16 0x in ?? () Current language: auto; currently asm Is that helpful to anyone? On 1/26/24 4:23 PM, Kirill Miazine wrote: Most recent package on amd64 snapshot from yesterday: OpenBSD 7.4-current (GENERIC.MP) #1625: Thu Jan 25 09:16:39 MST 2024 gdb says [...] #0 shmget () at /tmp/-:2 2 /tmp/-: No such file or directory. in /tmp/-
snmpd/agentx compatibility issue
Hi, I use snmpd on OpenBSD 7.4 and try to get it work with PyAgentX3 [1] in order to provide additional data to the SNMP daemon. To test it, I use the minimal agent as provided in the PyAgentX3 readme (with the "print" function adjusted to Python 3). The respective config line for snmpd looks as simple as it could be: agentx Connection management and registration between the two processes work. Unfortunately, no data is returned when issuing a GET command using both OpenBSD's "snmp get" on the local machine and NET-SNMP's "snmpget" on a remote Linux machine. Instead the connection to the subagent is aborted. Same applies to a "walk". The reason for that appears to be a check of the packetID in the AgentX PDU header by snmpd. From what I understand from RFC 2257, it is expected that the packetID of a response must the same as in the corresponding request. PyAgentX3 correctly does that. However, snmpd drops the response PDU during the handling of AX_PDU_TYPE_RESPONSE in ax_recv (ax.c) because it does not know the packet id, i.e. it's not in ax_packetids. From my point of view, this is due to appl_agentx_get calling ax_get with the request_id externally provided from the client (?). In ax_get, ax_pdu_header is called with that request_id. In turn, ax_pdu_header only asks for new IDs in case it is non-zero: if (packetid == 0) packetid = ax_packetid(ax); /* possible fix else if (type == AX_PDU_TYPE_GET /*NEXT ?! */) ax_record_packetid(packetid) */ So essentially, the request ID is passed through to the agentx subagent but not recorded in the array of known IDs causing the refusal of the subagent's response and finally connection close of the agentx socket. Since I am not an agentx/snmp(d) expert, I'm not sure if that's a bug in snmpd or expected behavior. I would be happy if somebody could confirm either way. That being said, my current fix was to disable the check for known ids in the handling of AX_PDU_TYPE_RESPONSEs, but that's apparently a bad idea. With that, however, both walking tree and getting the respective OIDs work as intended. Maybe the pseudo code above would be a better fix. Regards, Steffen [1] https://github.com/rprinz08/pyagentx3
Re: Screenshotting using PrtScr in cwm?
On 2024/02/11 01:49:46 +0100, "Carsten Reith" wrote: > On Sat, Feb 10, 2024 at 05:46:27PM +0100, b...@fea.st wrote: > > I did this now: > > > > ~$ mv .xsession .xsession.old > > > > > > ~$ mv .cwmrc .cwmrc.old > > > > > > ~$ doas reboot > > > > This landed me in fvwm. Even here, xev doesn't see the keypress. > > I then did 'echo exec cwm > .xsession' and restarted X. > > Here too, xev did not detect the keypress. > > > > I tried it on my T420 laptop > > (kern.version=OpenBSD 7.4-current (GENERIC.MP) #1669). > > .xsession: > setxkbmap de > exec cwm > > The Print key works fine with the laptop keyboard. > > If I attach an external USB keyboard, the Print key doesn't show up in > xev. I can reproduce here. Laptop' print key works, the USB keyboard one doesn't.