ICT: Diary
D: 28 W: 05

< July 2016 >
Sun Mon Tue Wed Thu Fri Sat
 12
3456789
10111213141516
17181920212223
24252627282930
31 

Based on notaweblog.php by joshua stein

[ ] Saturday, 16 July 2016 [ ]

Select Works Poorly

Following this flak post that was covered on lobste.rs I noticed that I was getting lots of collisions on my laptop.

So I built a kernel with the following diff:

nselcoll printf diff

port:fred ~> cat coll.diff 
Index: sys_generic.c
===================================================================
RCS file: /cvs/src/sys/kern/sys_generic.c,v
retrieving revision 1.112
diff -u -p -u -r1.112 sys_generic.c
--- sys_generic.c	5 Jul 2016 00:35:09 -0000	1.112
+++ sys_generic.c	16 Jul 2016 23:45:48 -0000
@@ -804,6 +804,7 @@ selwakeup(struct selinfo *sip)
 		return;
 	if (sip->si_flags & SI_COLL) {
 		nselcoll++;
+		printf("sw_coll: %ld\n", (long)sip->si_selpid);
 		sip->si_flags &= ~SI_COLL;
 		wakeup(&selwait);
 	}

So from some previous testing I knew that siren and firefox triggered collisions: doas ktrace -di siren date; uptime; sysctl kern.nselcoll; ps ax|grep siren

 Sun Jul 17 11:20:41 BST 2016
11:20AM  up  1:14, 7 users, load averages: 0.25, 0.24, 0.24
kern.nselcoll=61
62117 p3  R+p     0:00.00 grep siren
57603 p4  S+      0:00.05 siren
collisions where happening:
Jul 17 11:21:57 port /bsd: sw_coll: 57603
The dump file so far has not given me any clues:

doas kdump -f ktrace.out > siren.dump lobste.rsopenbsdcollisionkernel


$Id: diary,v 1.38 2025/01/01 22:43:54 fred Exp $