Re: build go projects with current: bad system call (core dumped)

2023-06-06 Thread Stuart Henderson
On 2023/06/06 15:39, Thomas Huber wrote:
> This issue seems to be related to hardware limits eg. not enough RAM.
> I came across these errors on a 1gig openbsd.amsterdam VM (thanks mischa for 
> your great
> service!!)
> But all the mentioned go projects build fine on larger OpenBSD-VMs (eg. 4gig 
> exoscale VM) and
> this builds run fine on the smaller VM.
> 
> Thanks Stuart for helping out again and verifying the build step.

Good that you've got it to build, but that doesn't make a lot of
sense as a reason, and I still think it's very likely that you're
running into a problem from some old binary or cached build somewhere.

There are probably some clues in kdump output from a failed run
("ktrace -i go install [...]", then "kdump | gzip > kdump.txt.gz")

This is how it looks if I make a clean build of nats-server,
restricted to 1G datasize:

$ ulimit -d $((1024*1024))
$ chmod -R +rwX go; rm -rf go; rm -rf .cache/go-build
$ go install -v github.com/nats-io/nats-server/v2@latest
go: downloading github.com/nats-io/nats-server/v2 v2.9.17
go: downloading github.com/nats-io/nats-server v1.4.1
go: downloading go.uber.org/automaxprocs v1.5.1
go: downloading github.com/klauspost/compress v1.16.5
go: downloading github.com/minio/highwayhash v1.0.2
go: downloading github.com/nats-io/jwt/v2 v2.4.1
go: downloading github.com/nats-io/nkeys v0.4.4
go: downloading github.com/nats-io/nuid v1.0.1
go: downloading golang.org/x/crypto v0.8.0
go: downloading golang.org/x/time v0.3.0
go: downloading golang.org/x/sys v0.7.0
encoding
internal/goarch
internal/unsafeheader
internal/coverage/rtcov
internal/goexperiment
internal/cpu
internal/goos
runtime/internal/atomic
internal/abi
runtime/internal/math
internal/itoa
runtime/internal/sys
math/bits
unicode/utf8
internal/race
sync/atomic
unicode
container/list
crypto/internal/alias
crypto/subtle
crypto/internal/boring/sig
unicode/utf16
vendor/golang.org/x/crypto/cryptobyte/asn1
internal/nettrace
vendor/golang.org/x/crypto/internal/alias
golang.org/x/crypto/internal/alias
golang.org/x/crypto/salsa20/salsa
hash/maphash
go.uber.org/automaxprocs/internal/runtime
internal/bytealg
math
runtime
internal/reflectlite
sync
internal/testlog
internal/godebug
internal/singleflight
runtime/cgo
internal/intern
math/rand
errors
sort
io
internal/safefilepath
internal/oserror
strconv
path
syscall
strings
reflect
bytes
hash
hash/crc32
bufio
crypto
container/heap
crypto/internal/randutil
crypto/internal/nistec/fiat
crypto/rc4
vendor/golang.org/x/net/dns/dnsmessage
net/netip
encoding/base32
regexp/syntax
golang.org/x/crypto/blowfish
hash/fnv
internal/syscall/unix
internal/syscall/execenv
time
github.com/nats-io/nats-server/v2/server/sysmem
vendor/golang.org/x/text/transform
net/http/internal/ascii
html
text/tabwriter
regexp
context
io/fs
internal/poll
encoding/binary
internal/fmtsort
embed
encoding/base64
crypto/md5
crypto/internal/edwards25519/field
crypto/cipher
encoding/pem
vendor/golang.org/x/crypto/internal/poly1305
os
crypto/internal/nistec
golang.org/x/crypto/internal/poly1305
crypto/internal/edwards25519
crypto/internal/boring
crypto/aes
crypto/hmac
crypto/sha1
fmt
path/filepath
crypto/sha256
crypto/des
crypto/sha512
vendor/golang.org/x/net/route
vendor/golang.org/x/crypto/chacha20
crypto/ecdh
vendor/golang.org/x/sys/cpu
vendor/golang.org/x/crypto/hkdf
io/ioutil
golang.org/x/sys/cpu
net
golang.org/x/crypto/nacl/secretbox
os/exec
vendor/golang.org/x/crypto/chacha20poly1305
golang.org/x/crypto/curve25519
flag
os/user
compress/flate
math/big
encoding/hex
net/url
encoding/json
compress/gzip
github.com/klauspost/compress/flate
github.com/minio/highwayhash
golang.org/x/crypto/blake2b
github.com/nats-io/nats-server/v2/conf
log
github.com/nats-io/nats-server/v2/server/pse
crypto/rand
crypto/elliptic
crypto/internal/bigmod
crypto/internal/boring/bbig
encoding/asn1
crypto/ed25519
crypto/rsa
crypto/dsa
github.com/klauspost/compress/s2
archive/tar
golang.org/x/crypto/ed25519
golang.org/x/crypto/nacl/box
github.com/nats-io/nuid
vendor/golang.org/x/crypto/cryptobyte
crypto/x509/pkix
github.com/nats-io/nkeys
github.com/nats-io/nats-server/v2/internal/ldap
golang.org/x/crypto/bcrypt
golang.org/x/crypto/chacha20
crypto/ecdsa
golang.org/x/crypto/chacha20poly1305
golang.org/x/time/rate
vendor/golang.org/x/text/unicode/bidi
vendor/golang.org/x/text/unicode/norm
vendor/golang.org/x/net/http2/hpack
crypto/x509
github.com/nats-io/jwt/v2
log/syslog
vendor/golang.org/x/text/secure/bidirule
github.com/nats-io/nats-server/v2/logger
net/textproto
mime
mime/quotedprintable
net/http/internal
internal/profile
runtime/pprof
mime/multipart
vendor/golang.org/x/net/idna
crypto/tls
golang.org/x/crypto/ocsp
runtime/trace
vendor/golang.org/x/net/http/httpguts
vendor/golang.org/x/net/http/httpproxy
go.uber.org/automaxprocs/maxprocs
os/signal
net/http/httptrace
net/http
net/http/pprof
github.com/nats-io/nats-server/v2/server
github.com/nats-io/nats-server/v2


... Whereas, restricted to 512M, I get a specifc "out of memory"
error 

Re: build go projects with current: bad system call (core dumped)

2023-06-06 Thread Thomas Huber
This issue seems to be related to hardware limits eg. not enough RAM.
I came across these errors on a 1gig openbsd.amsterdam VM (thanks mischa
for your great service!!)
But all the mentioned go projects build fine on larger OpenBSD-VMs (eg.
4gig exoscale VM) and this builds run fine on the smaller VM.

Thanks Stuart for helping out again and verifying the build step.


On Thu, 1 Jun 2023 at 16:34, Thomas Huber  wrote:

> On Thu, 1 Jun 2023 at 16:28, Stuart Henderson 
> wrote:
>
>> On 2023-06-01, Thomas Huber  wrote:
>> > Hi @misc,
>> >
>> > I face a problem with -current when building golang projects.
>> > This worked fine on 7.2 and I think it stopped working with 7.3 release.
>> > Now I try it on -current.
>> >
>> > I get the following error:
>> > "go: error obtaining buildID for go tool compile: signal: bad system
>> call
>> > (core dumped)"
>> >
>> > The Projects I´m trying to build are the nats-server[1] and natscli[2].
>> > go version go1.20.4 openbsd/amd64
>> >
>> > Maybe someone on this list has a clue...
>> > Thanks Thomas (the u2k20 host)
>> >
>> > --
>> > [1] https://github.com/nats-io/nats-server
>> > [2] https://github.com/nats-io/natscli
>> >
>>
>> If you have any old cached compiles lying around (.cache/go-build?) then
>> clear
>> them out and try again.
>>
>>
> thanks so far.
> but didn´t work with updated project dependencies nor a clean
> .cache/go-build.
>
>


Re: build go projects with current: bad system call (core dumped)

2023-06-01 Thread Thomas Huber
On Thu, 1 Jun 2023 at 16:28, Stuart Henderson 
wrote:

> On 2023-06-01, Thomas Huber  wrote:
> > Hi @misc,
> >
> > I face a problem with -current when building golang projects.
> > This worked fine on 7.2 and I think it stopped working with 7.3 release.
> > Now I try it on -current.
> >
> > I get the following error:
> > "go: error obtaining buildID for go tool compile: signal: bad system call
> > (core dumped)"
> >
> > The Projects I´m trying to build are the nats-server[1] and natscli[2].
> > go version go1.20.4 openbsd/amd64
> >
> > Maybe someone on this list has a clue...
> > Thanks Thomas (the u2k20 host)
> >
> > --
> > [1] https://github.com/nats-io/nats-server
> > [2] https://github.com/nats-io/natscli
> >
>
> If you have any old cached compiles lying around (.cache/go-build?) then
> clear
> them out and try again.
>
>
thanks so far.
but didn´t work with updated project dependencies nor a clean
.cache/go-build.


Re: build go projects with current: bad system call (core dumped)

2023-06-01 Thread Stuart Henderson
On 2023-06-01, Thomas Huber  wrote:
> Hi @misc,
>
> I face a problem with -current when building golang projects.
> This worked fine on 7.2 and I think it stopped working with 7.3 release.
> Now I try it on -current.
>
> I get the following error:
> "go: error obtaining buildID for go tool compile: signal: bad system call
> (core dumped)"
>
> The Projects I´m trying to build are the nats-server[1] and natscli[2].
> go version go1.20.4 openbsd/amd64
>
> Maybe someone on this list has a clue...
> Thanks Thomas (the u2k20 host)
>
> --
> [1] https://github.com/nats-io/nats-server
> [2] https://github.com/nats-io/natscli
>

If you have any old cached compiles lying around (.cache/go-build?) then clear
them out and try again.




Re: build go projects with current: bad system call (core dumped)

2023-06-01 Thread A Tammy


On 6/1/23 08:33, Thomas Huber wrote:
> Hi @misc,
>
> I face a problem with -current when building golang projects.
> This worked fine on 7.2 and I think it stopped working with 7.3 release.
> Now I try it on -current.
>
> I get the following error:
> "go: error obtaining buildID for go tool compile: signal: bad system call
> (core dumped)"
Update the 'sys' dependency to the latest version.
>
> The Projects I´m trying to build are the nats-server[1] and natscli[2].
> go version go1.20.4 openbsd/amd64
>
> Maybe someone on this list has a clue...
> Thanks Thomas (the u2k20 host)
>
> --
> [1] https://github.com/nats-io/nats-server
> [2] https://github.com/nats-io/natscli



build go projects with current: bad system call (core dumped)

2023-06-01 Thread Thomas Huber
Hi @misc,

I face a problem with -current when building golang projects.
This worked fine on 7.2 and I think it stopped working with 7.3 release.
Now I try it on -current.

I get the following error:
"go: error obtaining buildID for go tool compile: signal: bad system call
(core dumped)"

The Projects I´m trying to build are the nats-server[1] and natscli[2].
go version go1.20.4 openbsd/amd64

Maybe someone on this list has a clue...
Thanks Thomas (the u2k20 host)

--
[1] https://github.com/nats-io/nats-server
[2] https://github.com/nats-io/natscli