9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] go floating point exception
@ 2026-01-03  4:14 hahahahacker2009
  2026-01-03  4:57 ` ori
  0 siblings, 1 reply; 10+ messages in thread
From: hahahahacker2009 @ 2026-01-03  4:14 UTC (permalink / raw)
  To: 9fans

> btw, cdid you get a stack trace from the go runtime? or just that one
> l ine diagnostic?

I only get that line.  The program was cross-compiled on arm, with
Geoff's userland (a bit different from 9legacy's userland), but it
doesn't matter, right?

Currently I can't lstk() in acid, it says ``no stack frame''

> 
> On Fri, Jan 2, 2026 at 8:19 AM ron minnich <rminnich@gmail.com> wrote:
>>
>> I wonder why that exception is enabled? I wonder what is enabling it?
>> Does the go runtime turn it on?
>>
>> on linux, mxcsr is 0x1f80, all exceptions masked, and in particular, 0x20 is not set -- no precision exceptions.
>>
>> On Fri, Jan 2, 2026 at 6:23 AM <hahahahacker2009@gmail.com> wrote:
>>> 
>>> Hello,
>>> I don't know go, just have it to compile some programs.
>>> I cross-compiled this http server from arm for amd64:
>>> https://mkws.sh/https/https.go
>>> 
>>> Running it on 9legacy/amd64 (under qemu) will raise this error 50% of
>>> the time (otherwise it works pretty well):
>>> gohttp 177: suicide: sys: fp: Precision Exception mxcsr=0x20 pc=0x215443
>>> 
>>> Plan 9
>>> mmuinit: vmstart 0xfffffffff0000000 vmunused 0xfffffffff03cc000 vmunmapped 0xfffffffff0400000 vmend 0xfffffffffe000000
>>> sys->pd 0x108003 0x108023
>>> l 3 0xffffff7fbfdfeff8 107023
>>> l 2 0xffffff7fbfdffff8 108023
>>> l 1 0xffffff7fbffffc00 e3
>>> l 1 0xffffff7fbffffc00 e3
>>> base 0xfffffffff03d0000 ptr 0xfffffffff03d0000 nunits 14430208
>>> physalloc color=0 base=0xe000000 size=0x71fe0000
>>> apic0: hz 998949300 max 9989493 min 99894 div 3
>>> intrenable: nil handler for 11, tbdf 0xc001800 for ether0
>>> #l0: virtio10: 1Gbps port 0xfe000000 irq 11: 525400123456
>>> 2044M memory: 2800K+220M kernel, 1822M user, 0M lost
>>> pickmethod...read #e/nobootprompt...pickmethod done
>>> bind #æ...bind #S...partinit...part plan9 63 67103505
>>> p9part /dev/sdC0/data plan9
>>> part 9fat 63 204863
>>> part nvram 204863 204864
>>> part fossil 204864 10573102
>>> part arenas 10573102 62414293
>>> part isect 62414293 65006353
>>> part bloom 65006353 65530641
>>> auth...mount usbd...can't open /srv/usbtime...
>>> venti...2026/0102 11:36:29 venti: conf.../boot/venti: mem 2,236,962 bcmem 4,473,924 icmem 6,710,886...httpd tcp!127.1!8000...init...icache 6,710,886 bytes = 66,728 entries; 4 scache
>>> sync...announce tcp!127.1!17034...serving.
>>> fossil(#S/sdC0/fossil)...fsys: dialing venti at tcp!127.1!17034
>>> version...can't stat /srv/partfs.sdXX: '/srv/partfs.sdXX' file does not exist
>>> 
>>> init: starting /bin/rc
>>> secstore
>>> mkvbe: '/dev/realmode' file does not exist
>>> aux/vga: controller not in /lib/vgadb, not vesa
>>> 0xC0000 55 AA 4D E9 90 55 CC 00 00 00 00 00 00 00 00 00  U.M..U..........
>>> 0xC0010 00 00 00 00 00 00 00 00 5C 98 00 00 00 00 49 42  ........\.....IB
>>> 0xC0020 4D 00 2E 8B 16 E8 98 85 D2 74 01 EE C2 02 00 84  M........t......
>>> 0xC0030 C0 74 34 66 55 66 89 E5 66 53 66 89 C3 66 B8 00  .t4fUf..fSf..f..
>>> 0xC0040 40 00 00 FE CB 74 37 66 0F B7 D2 66 0F B7 C9 66  @....t7f...f...f
>>> 0xC0050 0F AF D1 66 C1 FA 03 66 89 D0 9C 66 05 FF 1F 00  ...f...f...f....
>>> 0xC0060 00 9D 25 00 E0 EB 17 0F AF CA 66 89 C8 9C 66 D1  ..%.......f...f.
>>> 0xC0070 E0 66 05 FF 07 00 00 9D 25 00 F8 C2 02 00 66 5B  .f......%.....f[
>>> 0xC0080 66 5D C2 02 00 66 55 66 89 E5 66 56 66 53 66 89  f]...fUf..fVfSf.
>>> 0xC0090 C6 66 89 D3 66 89 CA 67 66 8B 4D 08 67 8A 45 0C  .f..f..gf.M.g.E.
>>> 0xC00A0 66 C1 E6 10 66 0F B7 DB 66 09 F3 66 31 F6 8E C6  f...f...f..f1...
>>> 0xC00B0 26 66 89 1E 0C 01 80 F9 01 74 0D 80 F9 03 74 0C  &f.......t....t.
>>> 0xC00C0 84 C9 74 0A B0 19 EB 06 B0 0E EB 02 B0 2B 66 B9  ..t..........+f.
>>> 0xC00D0 40 00 00 00 8E C1 66 48 26 A2 84 00 8E C1 66 0F  @.....fH&.....f.
>>> 0xC00E0 B6 D2 26 89 16 85 00 66 5B 66 5E 66 5D C2 02 00  ..&....f[f^f]...
>>> 0xC00F0 66 55 66 89 E5 66 57 66 56 66 53 66 53 66 89 C3  fUf..fWfVfSfSf..
>>> aux/vga: main: vga@1024x768x1 not in /lib/vgadb
>>> rio: can't open display: initdisplay: /dev/draw/new: no frame buffer
>>> init: rc exit status: rio 41: display open
>>> 
>>> init: starting /bin/rc
>>> term%
>>> 
>>
>> 9fans / 9fans / see discussions + participants + delivery options Permalink

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T29cfe27ef87ed9d8-Mb83c3b9ff317d2cac8b9174a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [9fans] go floating point exception
@ 2026-01-05  6:55 hahahahacker2009
  2026-01-05 18:44 ` ron minnich
  0 siblings, 1 reply; 10+ messages in thread
From: hahahahacker2009 @ 2026-01-05  6:55 UTC (permalink / raw)
  To: 9fans

> I can't reproduce it. I'm using a macOS host, with qemu 10.1.2, Go
> 1.25.2 using rsc's 9legacy repo at
> https://github.com/rsc/plan9
> (it is convenient for qemu; u9fs serves the local content so you can
> use host OS tools, etc.)
> 

I copied the binary over rsc's tree but can't reproduce it there either.
But it still happen on 9legacy installed from the iso.
I cross compiled it on arm with go version go1.25.4 plan9/arm

I formatted another fossil file system with the snapshot after I installed
9legacy from the iso, recompile kernel, etc (to make sure that there is
no Geoff stuff). It still suicide with both http binaries (the one you've
posted here and the one I sent earlier).

(also, try running the fpnote test in rsc's /usr/glenda/src too,
it still fails many times).

> Does it fail on startup or 50% of the time when you send a request?
> I use this modified Go http package example:
> 
> package main
> 
> import (
>     "log"
>     "net/http"
> )
> 
> func main() {
>     log.Fatal(http.ListenAndServe(":9000",
> http.FileServer(http.Dir("/sys/doc"))))
> }
> 
> On Fri, Jan 2, 2026 at 6:23 AM <hahahahacker2009@gmail.com> wrote:
>> 
>> Hello,
>> I don't know go, just have it to compile some programs.
>> I cross-compiled this http server from arm for amd64:
>> https://mkws.sh/https/https.go
>> 
>> Running it on 9legacy/amd64 (under qemu) will raise this error 50% of
>> the time (otherwise it works pretty well):
>> gohttp 177: suicide: sys: fp: Precision Exception mxcsr=0x20 pc=0x215443
>> 
>> Plan 9
>> mmuinit: vmstart 0xfffffffff0000000 vmunused 0xfffffffff03cc000 vmunmapped 0xfffffffff0400000 vmend 0xfffffffffe000000
>> sys->pd 0x108003 0x108023
>> l 3 0xffffff7fbfdfeff8 107023
>> l 2 0xffffff7fbfdffff8 108023
>> l 1 0xffffff7fbffffc00 e3
>> l 1 0xffffff7fbffffc00 e3
>> base 0xfffffffff03d0000 ptr 0xfffffffff03d0000 nunits 14430208
>> physalloc color=0 base=0xe000000 size=0x71fe0000
>> apic0: hz 998949300 max 9989493 min 99894 div 3
>> intrenable: nil handler for 11, tbdf 0xc001800 for ether0
>> #l0: virtio10: 1Gbps port 0xfe000000 irq 11: 525400123456
>> 2044M memory: 2800K+220M kernel, 1822M user, 0M lost
>> pickmethod...read #e/nobootprompt...pickmethod done
>> bind #æ...bind #S...partinit...part plan9 63 67103505
>> p9part /dev/sdC0/data plan9
>> part 9fat 63 204863
>> part nvram 204863 204864
>> part fossil 204864 10573102
>> part arenas 10573102 62414293
>> part isect 62414293 65006353
>> part bloom 65006353 65530641
>> auth...mount usbd...can't open /srv/usbtime...
>> venti...2026/0102 11:36:29 venti: conf.../boot/venti: mem 2,236,962 bcmem 4,473,924 icmem 6,710,886...httpd tcp!127.1!8000...init...icache 6,710,886 bytes = 66,728 entries; 4 scache
>> sync...announce tcp!127.1!17034...serving.
>> fossil(#S/sdC0/fossil)...fsys: dialing venti at tcp!127.1!17034
>> version...can't stat /srv/partfs.sdXX: '/srv/partfs.sdXX' file does not exist
>> 
>> init: starting /bin/rc
>> secstore
>> mkvbe: '/dev/realmode' file does not exist
>> aux/vga: controller not in /lib/vgadb, not vesa
>> 0xC0000 55 AA 4D E9 90 55 CC 00 00 00 00 00 00 00 00 00  U.M..U..........
>> 0xC0010 00 00 00 00 00 00 00 00 5C 98 00 00 00 00 49 42  ........\.....IB
>> 0xC0020 4D 00 2E 8B 16 E8 98 85 D2 74 01 EE C2 02 00 84  M........t......
>> 0xC0030 C0 74 34 66 55 66 89 E5 66 53 66 89 C3 66 B8 00  .t4fUf..fSf..f..
>> 0xC0040 40 00 00 FE CB 74 37 66 0F B7 D2 66 0F B7 C9 66  @....t7f...f...f
>> 0xC0050 0F AF D1 66 C1 FA 03 66 89 D0 9C 66 05 FF 1F 00  ...f...f...f....
>> 0xC0060 00 9D 25 00 E0 EB 17 0F AF CA 66 89 C8 9C 66 D1  ..%.......f...f.
>> 0xC0070 E0 66 05 FF 07 00 00 9D 25 00 F8 C2 02 00 66 5B  .f......%.....f[
>> 0xC0080 66 5D C2 02 00 66 55 66 89 E5 66 56 66 53 66 89  f]...fUf..fVfSf.
>> 0xC0090 C6 66 89 D3 66 89 CA 67 66 8B 4D 08 67 8A 45 0C  .f..f..gf.M.g.E.
>> 0xC00A0 66 C1 E6 10 66 0F B7 DB 66 09 F3 66 31 F6 8E C6  f...f...f..f1...
>> 0xC00B0 26 66 89 1E 0C 01 80 F9 01 74 0D 80 F9 03 74 0C  &f.......t....t.
>> 0xC00C0 84 C9 74 0A B0 19 EB 06 B0 0E EB 02 B0 2B 66 B9  ..t..........+f.
>> 0xC00D0 40 00 00 00 8E C1 66 48 26 A2 84 00 8E C1 66 0F  @.....fH&.....f.
>> 0xC00E0 B6 D2 26 89 16 85 00 66 5B 66 5E 66 5D C2 02 00  ..&....f[f^f]...
>> 0xC00F0 66 55 66 89 E5 66 57 66 56 66 53 66 53 66 89 C3  fUf..fWfVfSfSf..
>> aux/vga: main: vga@1024x768x1 not in /lib/vgadb
>> rio: can't open display: initdisplay: /dev/draw/new: no frame buffer
>> init: rc exit status: rio 41: display open
>> 
>> init: starting /bin/rc
>> term%
>> 

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Ta43f70982c6bc008-M35cca9792702cb1a0710e1b1
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [9fans] go floating point exception
@ 2026-01-02 12:22 hahahahacker2009
  2026-01-02 16:15 ` ron minnich
  2026-01-04  2:37 ` Skip Tavakkolian
  0 siblings, 2 replies; 10+ messages in thread
From: hahahahacker2009 @ 2026-01-02 12:22 UTC (permalink / raw)
  To: 9fans

Hello,
I don't know go, just have it to compile some programs.
I cross-compiled this http server from arm for amd64:
https://mkws.sh/https/https.go

Running it on 9legacy/amd64 (under qemu) will raise this error 50% of
the time (otherwise it works pretty well):
gohttp 177: suicide: sys: fp: Precision Exception mxcsr=0x20 pc=0x215443

Plan 9
mmuinit: vmstart 0xfffffffff0000000 vmunused 0xfffffffff03cc000 vmunmapped 0xfffffffff0400000 vmend 0xfffffffffe000000
sys->pd 0x108003 0x108023
l 3 0xffffff7fbfdfeff8 107023
l 2 0xffffff7fbfdffff8 108023
l 1 0xffffff7fbffffc00 e3
l 1 0xffffff7fbffffc00 e3
base 0xfffffffff03d0000 ptr 0xfffffffff03d0000 nunits 14430208
physalloc color=0 base=0xe000000 size=0x71fe0000
apic0: hz 998949300 max 9989493 min 99894 div 3
intrenable: nil handler for 11, tbdf 0xc001800 for ether0
#l0: virtio10: 1Gbps port 0xfe000000 irq 11: 525400123456
2044M memory: 2800K+220M kernel, 1822M user, 0M lost
pickmethod...read #e/nobootprompt...pickmethod done
bind #æ...bind #S...partinit...part plan9 63 67103505
p9part /dev/sdC0/data plan9
part 9fat 63 204863
part nvram 204863 204864
part fossil 204864 10573102
part arenas 10573102 62414293
part isect 62414293 65006353
part bloom 65006353 65530641
auth...mount usbd...can't open /srv/usbtime...
venti...2026/0102 11:36:29 venti: conf.../boot/venti: mem 2,236,962 bcmem 4,473,924 icmem 6,710,886...httpd tcp!127.1!8000...init...icache 6,710,886 bytes = 66,728 entries; 4 scache
sync...announce tcp!127.1!17034...serving.
fossil(#S/sdC0/fossil)...fsys: dialing venti at tcp!127.1!17034
version...can't stat /srv/partfs.sdXX: '/srv/partfs.sdXX' file does not exist

init: starting /bin/rc
secstore
mkvbe: '/dev/realmode' file does not exist
aux/vga: controller not in /lib/vgadb, not vesa
0xC0000 55 AA 4D E9 90 55 CC 00 00 00 00 00 00 00 00 00  U.M..U..........
0xC0010 00 00 00 00 00 00 00 00 5C 98 00 00 00 00 49 42  ........\.....IB
0xC0020 4D 00 2E 8B 16 E8 98 85 D2 74 01 EE C2 02 00 84  M........t......
0xC0030 C0 74 34 66 55 66 89 E5 66 53 66 89 C3 66 B8 00  .t4fUf..fSf..f..
0xC0040 40 00 00 FE CB 74 37 66 0F B7 D2 66 0F B7 C9 66  @....t7f...f...f
0xC0050 0F AF D1 66 C1 FA 03 66 89 D0 9C 66 05 FF 1F 00  ...f...f...f....
0xC0060 00 9D 25 00 E0 EB 17 0F AF CA 66 89 C8 9C 66 D1  ..%.......f...f.
0xC0070 E0 66 05 FF 07 00 00 9D 25 00 F8 C2 02 00 66 5B  .f......%.....f[
0xC0080 66 5D C2 02 00 66 55 66 89 E5 66 56 66 53 66 89  f]...fUf..fVfSf.
0xC0090 C6 66 89 D3 66 89 CA 67 66 8B 4D 08 67 8A 45 0C  .f..f..gf.M.g.E.
0xC00A0 66 C1 E6 10 66 0F B7 DB 66 09 F3 66 31 F6 8E C6  f...f...f..f1...
0xC00B0 26 66 89 1E 0C 01 80 F9 01 74 0D 80 F9 03 74 0C  &f.......t....t.
0xC00C0 84 C9 74 0A B0 19 EB 06 B0 0E EB 02 B0 2B 66 B9  ..t..........+f.
0xC00D0 40 00 00 00 8E C1 66 48 26 A2 84 00 8E C1 66 0F  @.....fH&.....f.
0xC00E0 B6 D2 26 89 16 85 00 66 5B 66 5E 66 5D C2 02 00  ..&....f[f^f]...
0xC00F0 66 55 66 89 E5 66 57 66 56 66 53 66 53 66 89 C3  fUf..fWfVfSfSf..
aux/vga: main: vga@1024x768x1 not in /lib/vgadb
rio: can't open display: initdisplay: /dev/draw/new: no frame buffer
init: rc exit status: rio 41: display open

init: starting /bin/rc
term% 


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0bea758ed759c8d5-M9a19ac6fdc30c3c7f7aeeb15
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-01-05 19:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-03  4:14 [9fans] go floating point exception hahahahacker2009
2026-01-03  4:57 ` ori
2026-01-03 18:24   ` ron minnich
  -- strict thread matches above, loose matches on Subject: below --
2026-01-05  6:55 hahahahacker2009
2026-01-05 18:44 ` ron minnich
2026-01-02 12:22 hahahahacker2009
2026-01-02 16:15 ` ron minnich
2026-01-02 16:57   ` Ron Minnich
2026-01-02 17:20     ` ron minnich
2026-01-04  2:37 ` Skip Tavakkolian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).