libera/#devuan/ Wednesday, 2021-01-13

Xenguyfsmithred: That 'pstree' utility is a nice, easy-to-parse visualization of PC processes.  Surprised I didn't run across that sooner.01:41
XenguyCoincidentally I re-discovered 'tree' recently too01:42
fsmithredXenguy, you know pgrep?02:04
Xenguyfsmithred: yes, pgrep and pkill come together I think02:11
XenguyVery useful, and frequently used.  Used to use 'ps aux |grep foo, or killall was popular too, before I came across pkill02:12
XenguyKatolaz made me aware of pidof too02:13
Xenguy(through his conference presentation02:13
Xenguy)02:13
fsmithredwas trying to think of that one02:13
Xenguyminimalism was the theme of his talk, and I really enjoyed watching that (I liked the chocolates he was throwing too)02:14
CAPTCHA_REQUIREDHi03:44
CAPTCHA_REQUIREDI'm getting quark: pthread_create: Resource temporarily unavailable when my system has more than enough resources available03:44
CAPTCHA_REQUIREDWhy else could this happen?03:44
CAPTCHA_REQUIREDHere is the relevant syscalls03:45
CAPTCHA_REQUIREDclone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f379e668a10) = 1862903:45
CAPTCHA_REQUIREDwait4(-1, quark: pthread_create: Resource temporarily unavailable03:45
CAPTCHA_REQUIRED[{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 1862903:45
gnarfaceCAPTCHA_REQUIRED: probably some ulimit thing.  check documentation on ulimit and /etc/security/limits.conf03:54
CAPTCHA_REQUIREDIm using stock limits03:56
CAPTCHA_REQUIREDHowever, I am using a kernel control group limit of 2G03:56
CAPTCHA_REQUIREDI've still got 1.7Gi available within this namespace only only 19 pids running inside of it, So I don't think it could be a memory thing03:57
CAPTCHA_REQUIREDAlso, I'm only trying to create 4 threads03:58
gnarfacehow many files are you trying to open at once?03:58
CAPTCHA_REQUIREDHmm03:58
CAPTCHA_REQUIREDIs there a way to tell that gnarface?03:58
gnarfacethis isn't something you wrote yourself?03:58
CAPTCHA_REQUIREDNo03:59
CAPTCHA_REQUIREDWell03:59
CAPTCHA_REQUIREDNot mostly03:59
CAPTCHA_REQUIREDIt's a kernel cgroup namespace of prosody, tor daemon (relay+directory), and quark03:59
CAPTCHA_REQUIREDHmm04:00
gnarfacewhat is the stock # of available file handles now? 4096 still?  because that's not even enough to make wine or steam happy.04:00
CAPTCHA_REQUIREDfile locks                      (-x) unlimited04:01
gnarfaceyou can use lsof to check the open files count04:01
gnarfacelsof | wc -l04:02
gnarfacesomething like that04:02
gnarfaceor: lsof -p [pid]04:02
CAPTCHA_REQUIREDYeah04:02
gnarfacei think04:02
CAPTCHA_REQUIREDOh looks like it's taking a while to populate04:02
CAPTCHA_REQUIREDHey04:02
CAPTCHA_REQUIREDI do have a LOT of TCP sessions open04:02
CAPTCHA_REQUIREDFor all the XMPP s2s connections and tor relays04:03
gnarfacethere are limits on tcp connection counts and amount of ram used by them04:03
gnarfacecheck also /etc/sysctl.conf for that stuff04:03
CAPTCHA_REQUIREDGive me a sec it's trying to do rdns04:03
CAPTCHA_REQUIRED149504:03
CAPTCHA_REQUIREDOh wait04:04
CAPTCHA_REQUIREDOutside of the namespace04:04
gnarfacehmm, i dunno but the kernel has some defaults to prevent processes from going off the rails and taking down the system, but sometimes if you have very high-end hardware they can strangle your throughput unless you adjust them a bit04:04
CAPTCHA_REQUIREDThe lsof command failed printing lsof: no pwd entry for UID 100004:04
CAPTCHA_REQUIREDand lsof: no pwd entry for UID 99904:04
CAPTCHA_REQUIREDover and over again04:04
CAPTCHA_REQUIREDThen returned 3121904:04
gnarfaceand if you're using a virtualization container of some sort then that can cause extra complications between the guest and host's limits04:05
CAPTCHA_REQUIREDI'm using lxc04:05
gnarfacei could almost have guessed that04:05
gnarfacenote that there are both hard and soft limits with different defaults04:06
CAPTCHA_REQUIREDJust to be clear gnarface you don't think it's a thread limit, but somehow my system has run out of file descriptors04:07
CAPTCHA_REQUIREDAnd I need to find out what is taking all my descriptors, or increase the limit04:08
gnarfaceCAPTCHA_REQUIRED: well there's a bunch of limits and i'm just guessing it might be one of them, not necessarily the file descriptor one, but that one is the one i ran into troubles with the most, so it was my first guess04:08
gnarfacenote that if you're using lxc, there might be situations where you have to adjust the limits for both the host and the guest04:09
gnarfacei'm not very familiar with lxc, but it's unlikely the host for a proper virtualization solution would allow it's guest's limits to exceed it's own04:09
CAPTCHA_REQUIREDIf i was exceeding a limit would it show up in a log somewhere?04:10
gnarfaceprobably, but the error you pasted was sufficient for google to corroborate my hypothesis04:11
gnarfaceyou can also manually check each limit with the ulimit tool04:11
gnarface(try it and note that you'll get different responses depending on whether you're in our out of the guest, whether you're root or not, and whether you're ssh'd or on a physically local terminal or not)04:12
gnarface(and don't forget to check both hard and soft limits)04:12
CAPTCHA_REQUIRED» ~# lsof 2>/dev/null | wc -l04:13
CAPTCHA_REQUIRED» 3118804:13
CAPTCHA_REQUIREDThis is from the host04:14
CAPTCHA_REQUIREDI had to redirect stderr because the uids were subuids04:14
gnarfaceyou gotta constrain that by individual process04:14
CAPTCHA_REQUIREDHmm04:14
CAPTCHA_REQUIREDfs.file-max = 40161404:15
gnarfacetry: lsof -p [pid of guest]04:15
CAPTCHA_REQUIREDI don't think it works like that gnarf04:15
fluffywolftrying new versions of things after the beowulf upgrade...  gimp's tool icons seem to be broken.  they're light grey shapes that are essentially invisible, and are the same no matter which of the four themes I pick.04:16
CAPTCHA_REQUIREDThe entire ptree is exposed to the hos04:16
CAPTCHA_REQUIREDT04:16
CAPTCHA_REQUIREDUnless you mean pid of guest's init04:16
fluffywolfnevermind.  changing icon themes fixed it.  apparantly the default is "invisible".04:16
fluffywolf...04:16
CAPTCHA_REQUIREDThere's only one thing that concerns me lxc.cgroup.memory.limit_in_bytes = 2G04:18
CAPTCHA_REQUIREDMemory use:     820.73 MiB04:19
CAPTCHA_REQUIREDKMem use:       28.78 MiB04:19
gnarfaceCAPTCHA_REQUIRED: sorry i don't know enough about lxc04:19
CAPTCHA_REQUIREDNo worries04:19
gnarfacei'm relatively certain i've put you on the right path, but closing the loop is gonna require reading some documentation about the matter04:19
CAPTCHA_REQUIREDYeah04:21
CAPTCHA_REQUIREDWell04:21
CAPTCHA_REQUIREDI get the error on the host too04:21
CAPTCHA_REQUIREDp# /var/tmp/quark -p 80 -h :: -u www-data -g www-data -d /usr/share/vim04:21
CAPTCHA_REQUIRED/var/tmp/quark: pthread_create: Resource temporarily unavailable04:21
gnarfacefluffywolf: maybe related, maybe not but a long time before beowulf i ran into a problem with the default icon themes not having icons which manifested in that basic way. i installed tango-icon-theme and put gtk-icon-theme-name="Tango" in my ~/.gtkrc-2.0.mine04:21
CAPTCHA_REQUIREDMaybe it's a problem with the code04:21
gnarfacei would look for it opening stuff in a loop but not closing it after04:22
gnarfacebut if this is online, this can also be caused by incoming network connections04:22
CAPTCHA_REQUIREDYeah it was a problem with the code04:23
CAPTCHA_REQUIREDI went back to an earlier revision04:23
CAPTCHA_REQUIREDBefore threading was implemented04:23
gnarfacehuh, is it perl?04:24
CAPTCHA_REQUIRED» <gnarface> but if this is online, this can also be caused by incoming network connections04:24
CAPTCHA_REQUIREDcan you elaborate? It's been a while since I had to tune a linux kernel for lots of long-sustained TCP sessions04:24
CAPTCHA_REQUIREDgnarface: no it's just C04:24
gnarfacewell, like i said, there's other limits, not just on number of open files04:24
CAPTCHA_REQUIREDgnarface: here is the source https://git.suckless.org/quark/04:25
gnarfacesome of them are in the kernel sysctl.conf04:25
gnarfacenow it is a known type of attack for public facing servers to be DOS'd by simply exhausting the available network connections04:25
gnarfaceclients will just find some service that responds by opening a connection and waits politely to close, then they just don't close it04:25
gnarfacethen they open more04:26
gnarfacein a loop04:26
gnarfaceif they don't care about a valid response then it doesn't matter that the connection hangs04:26
gnarfaceall they care about is using up the available connections faster than the timeout clears them04:27
gnarfaceit's usually easier to deal with these vandals at the firewall level though04:27
CAPTCHA_REQUIREDYeah i've dealt with those in the past04:36
CAPTCHA_REQUIREDUsually they aren't very smart about it and do the synflood from a singal ip range04:37
CAPTCHA_REQUIREDWhich is easier enough to filter out with a bucket04:37
unixbsddoes the Linux kernel of devuan on AMD64 (testing or sid) read the UFS A6 FS format of openbsd?10:45
gnarfaceunixbsd: yes, but the module might not have auto-loaded for you11:20
gnarfaceoh, well i dunno about "A6" specifically, whatever that is11:20
gnarfacei would say modprobe ufs and try it11:21
apollo__how would I go about finding out what processes are altering /proc/sys/vm/{dirty_background_bytes,dirty_bytes} and their friends? about once a week or so they get set to 0 which makes a mess for usb thumbdrives.15:05
gnarfacefuser maybe?15:06
apollo__gnarface, that would works if something was writing to the files continuously. but it just exits if nothing is accessing the file /right now/.15:13
apollo__i mean, i could set up a cron to check the values every minute (i already have it set to write sane values in rc.local on boot), but that seems a hopeless throw-your-hands-in-the-air workaround rather than a i-know-whats-happening-here solution15:15
gnarfacehmmm, maybe check out systraq or tripwire15:17
gnarfacethere's also inotify or dnotify but i think those are the type of things you gotta write code to use15:17
apollo__gnarface, thanks for the hints, checking...15:49
DPAMaybe auditd could help with that.15:59
masonunixbsd: Worst case, you can run a VM that can access your UFS. Remember that UFS is years past meaning just one filesystem, so universal support is harder and harder.16:21
unixbsdHello, which software allows to modify a PDF documents, with adding Gifs, Png,... or Text on it, to be annotated?21:11
djphunixbsd: generally one would write some form of sourcecode document (e.g. LaTeX or LO) and then let that compile the PDF21:17
unixbsdI would like to add little text on the document, on each page. Of courses, doing with latex, would be nicely possible. I guess to add a y,x Text on it, at given fixed absolute position might be possible somehow.21:18
djphI mean, there are also paid-for editors if the only "source" you have is an already-compiled PDF.21:19
specingunixbsd: mupdf, probably21:20
unixbsdSure, I have only a source : PDF (compiled, and only this).21:20
unixbsdmupdf has not editing capability, it is only a viewer.21:20
onefangLibreOffice, maybe GIMP.21:22
unixbsdI didnt know that libreoffice would edit PDF documents (here about 30-40 pages).21:23
onefangI vaguely recall that it does.21:24
unixbsdactually your idea to use pdfpages{ page ... = 1,... 30}  + use x,y editing thing on the pdf (each pages), then run pdflatex might be interesting output.21:25
unixbsdit is however bit hard, I cannot recall how to place text or png at a given position using tex21:29
aitor_unixbsd: i did something in the past using the haru library22:22
aitor_http://libharu.org/22:22
rwpunixbsd, I have a client using a commercial bit of software for filling in parts like gifs and things. But recently I was looking for a replacement and I think pdftk will do the same thing.22:23
rwpI have used pdftk a lot for other things and it is on my short list to go investigate using it to fill in pdf forms and to insert graphs and things.22:24
rwpaitor_, I haven't heard of haru before but I am adding it to my list to go look at!22:24
rwpIs haru packaged?  One advantage of pdftk is that it is already packaged and available for installation.22:25
rwpIt looks like libharu is all about generating pdf files.  Is that right?  My need, different from unixbsd I am sure, is to generate a pretty report in pdf format with portions filled in.22:26
aitor_nope, as far as i know, but i did it in the past22:26
aitor_libharu doesn't support reading and editing existing pdf files so far, but you can generate a new one and combine the result with an existing one using the pdftk toolkit22:26
aitor_i did .deb packages a few years ago, and started working on some C libraries22:27
aitor_c++, better said, but i abandoned the work22:28
aitor_it might be interesting to take it up again22:30
rwpPDF has this concept of tagged fields that then can have objects stuffed into them later.22:31
rwpThis allows someone relatively unskilled to generate a PDF template and then have it filled in later such as in a web page generating a report.22:31
rwpBut almost everything about PDFs are ten times harder than they should be because of the Adobe nature of PDF.  I wish there were something better.  Like plain text!22:32
unixbsdonefang: I have modified the mupdf project, compiled it, and now it can show the position x,y. https://gitlab.com/openbsd98324/mupdf22:32
unixbsdthen, I run pdlatex with the package: texblock* so that I can place at x,y the box or text, or even imaage on the top of pdf (pdfpage or wallpaper background pdf).22:33
aitor_unixbsd, that's interesting!22:34
unixbsdreally,? It is just little bit of C and tex. nothing else.22:34
aitor_little things give ideas :)22:35
unixbsdaitor_: please find herewith the little source code, url: https://termbin.com/mbbf  since it interests you.22:56
aitor_thanks, i'll take a look22:57
aitor_rwp: *nope, as far as i know, but i did it in the past*  <-- I was referring to the existence of the packages. haru is not packaged23:31

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!