Re: "Cannot allocate memory" error when memory is enough

2018-07-09 Thread Stuart Henderson
On 2018-07-09, Nan Xiao  wrote:
> Hi Stuart,
>
> This is my kernel information:
>
> $ sysctl -n kern.version | head -1
> OpenBSD 6.3 (GENERIC.MP) #4: Sun Jun 17 11:22:20 CEST 2018
>
> I remember I used to build -current code before. So is it possible
> that will mess up my system?

Anything that you installed from packages while running -current has a
higher chance than usual of being broken.

I would suggest reinstalling all packages and forcing to make sure you
have the correct version:

PKG_PATH=http://some.mirror.example/pub/OpenBSD/6.3/packages/amd64/ pkg_add -D 
downgrade -D installed -u

You may also have newer libraries in /usr/lib or /usr/X11R6/lib that could
cause problems too, I would remove files with dates that don't match the
release.

Generally going backwards from -current to release is not recommended
unless you know how to clean things up.




Re: "Cannot allocate memory" error when memory is enough

2018-07-08 Thread Nan Xiao
Hi Stuart,

This is my kernel information:

$ sysctl -n kern.version | head -1
OpenBSD 6.3 (GENERIC.MP) #4: Sun Jun 17 11:22:20 CEST 2018

I remember I used to build -current code before. So is it possible
that will mess up my system?

Thanks!
Best Regards
Nan Xiao


On Sun, Jul 8, 2018 at 10:17 PM, Stuart Henderson  wrote:
> On 2018/07/08 21:56, Nan Xiao wrote:
>> Hi Stuart,
>>
>> Thanks for your reply!
>>
>> $ cat /etc/installurl
>> https://ftp.openbsd.org/pub/OpenBSD
>>
>> Does my /etc/installurl will always fetch -current?
>>
>> Thanks in advance!
>> Best Regards
>> Nan Xiao
>>
>>
>> On Sun, Jul 8, 2018 at 7:33 AM, Stuart Henderson  
>> wrote:
>> > On 2018-07-07, Tom Smyth  wrote:
>> >> Hi otto
>> >>
>> >> I must check that last time i read man page  it was related it was for
>> >> syspatch
>> >
>> > /etc/installurl is used if present, pkg_add selects /snapshots/ or /6.3/
>> > etc depending on the kernel version string.
>> >
>> > If set, PKG_PATH overrides /etc/installurl, and this takes either a short
>> > hostname (in which case the same rules apply for version string), or a
>> > full path (either as a static string or with placeholders replaced by
>> > arch/version).
>> >
>> > That is why I asked if PKG_PATH was set.
>> >
>> >
>
> It depends on what kernel you are running.
>
> $ sysctl -n kern.version | head -1
> OpenBSD 6.3-current (GENERIC.MP) #6: Thu Jul  5 21:40:47 BST 2018
>
> -> fetches -current packages
>
> $ sysctl -n kern.version | head -1
> OpenBSD 6.3 (GENERIC.MP) #107: Sat Mar 24 14:21:59 MDT 2018
>
> -> fetches release packages
>
> Also I would recommend against using ftp.openbsd.org, pick a local mirror
> or if using releases one of the CDNs instead ..
>



Re: "Cannot allocate memory" error when memory is enough

2018-07-08 Thread Stuart Henderson
On 2018/07/08 21:56, Nan Xiao wrote:
> Hi Stuart,
> 
> Thanks for your reply!
> 
> $ cat /etc/installurl
> https://ftp.openbsd.org/pub/OpenBSD
> 
> Does my /etc/installurl will always fetch -current?
> 
> Thanks in advance!
> Best Regards
> Nan Xiao
> 
> 
> On Sun, Jul 8, 2018 at 7:33 AM, Stuart Henderson  wrote:
> > On 2018-07-07, Tom Smyth  wrote:
> >> Hi otto
> >>
> >> I must check that last time i read man page  it was related it was for
> >> syspatch
> >
> > /etc/installurl is used if present, pkg_add selects /snapshots/ or /6.3/
> > etc depending on the kernel version string.
> >
> > If set, PKG_PATH overrides /etc/installurl, and this takes either a short
> > hostname (in which case the same rules apply for version string), or a
> > full path (either as a static string or with placeholders replaced by
> > arch/version).
> >
> > That is why I asked if PKG_PATH was set.
> >
> >

It depends on what kernel you are running.

$ sysctl -n kern.version | head -1
OpenBSD 6.3-current (GENERIC.MP) #6: Thu Jul  5 21:40:47 BST 2018

-> fetches -current packages

$ sysctl -n kern.version | head -1
OpenBSD 6.3 (GENERIC.MP) #107: Sat Mar 24 14:21:59 MDT 2018

-> fetches release packages

Also I would recommend against using ftp.openbsd.org, pick a local mirror
or if using releases one of the CDNs instead ..



Re: "Cannot allocate memory" error when memory is enough

2018-07-08 Thread Nan Xiao
Hi Stuart,

Thanks for your reply!

$ cat /etc/installurl
https://ftp.openbsd.org/pub/OpenBSD

Does my /etc/installurl will always fetch -current?

Thanks in advance!
Best Regards
Nan Xiao


On Sun, Jul 8, 2018 at 7:33 AM, Stuart Henderson  wrote:
> On 2018-07-07, Tom Smyth  wrote:
>> Hi otto
>>
>> I must check that last time i read man page  it was related it was for
>> syspatch
>
> /etc/installurl is used if present, pkg_add selects /snapshots/ or /6.3/
> etc depending on the kernel version string.
>
> If set, PKG_PATH overrides /etc/installurl, and this takes either a short
> hostname (in which case the same rules apply for version string), or a
> full path (either as a static string or with placeholders replaced by
> arch/version).
>
> That is why I asked if PKG_PATH was set.
>
>



Re: "Cannot allocate memory" error when memory is enough

2018-07-07 Thread Stuart Henderson
On 2018-07-07, Tom Smyth  wrote:
> Hi otto
>
> I must check that last time i read man page  it was related it was for
> syspatch

/etc/installurl is used if present, pkg_add selects /snapshots/ or /6.3/
etc depending on the kernel version string.

If set, PKG_PATH overrides /etc/installurl, and this takes either a short
hostname (in which case the same rules apply for version string), or a
full path (either as a static string or with placeholders replaced by
arch/version).

That is why I asked if PKG_PATH was set.




Re: "Cannot allocate memory" error when memory is enough

2018-07-07 Thread Tom Smyth
Hello
yeah the installurl functionality appears to have been added to
after 6.1

thanks Otto

On 7 July 2018 at 17:10, Tom Smyth  wrote:
> Hi otto
>
> I must check that last time i read man page  it was related it was for
> syspatch
>
>
> Thanks
>
>
>
> On Sat 7 Jul 2018, 17:07 Otto Moerbeek,  wrote:
>>
>> On Sat, Jul 07, 2018 at 03:52:44PM +0100, Tom Smyth wrote:
>>
>> > Hello Nan,
>> > you need to set the PKG_path as Stuart suggested to install packages
>> > using
>> >
>> > pkg_add command
>> >
>> > for example to use fastly cdn  mirror you would set your pkg_path
>> > variable as
>> > shown below
>> >
>> > export PKG_PATH=https://fastly.cdn.openbsd.org/pub/OpenBSD/$(uname
>> > -r)/packages/$(uname -p)/
>> >
>> > /etc/installurl  file is for the syspatch utility to install binary
>> > patches for the release
>>
>> Wrong. installurl *is* used by pkg_add. Read the man page.
>>
>> -Otto
>> >
>> >
>> >
>> > if you are using current ... Packages  are less straight forward as
>> > packages and current
>> > are modified regularly updated
>> > so if you go to install a package from today on a current snapshot from
>> > 1 week
>> > ago it is not guaranteed to work
>> >
>> > i believe there are few ways around this
>> > 1) install the packages that you expect to use on current as soon as
>> > possible
>> > after install
>> > 2) if you must use that version of current for some reason ... when
>> > downloading
>> > the current install iso / install image, download the contents of the
>> > entire package
>> > directory for current also. (on the same day )  your millage on this
>> > will vary  depending
>> > on what work is being done on the tree at the time
>> >
>> > and if anyone else uses a  better way id love to know also
>> >
>> >
>> > I hope this helps
>> >
>> >
>> > On 7 July 2018 at 15:26, Nan Xiao  wrote:
>> > > HI Stuart,
>> > >
>> > > Thanks for your reply!
>> > >
>> > > I don't set PKG_PATH environment.
>> > >
>> > > Yes, it seems I installed the current package:
>> > > $ ls -l /usr/local/bin/egdb
>> > > -rwxr-xr-x  1 root  bin  10040410 Jun 28 19:03 /usr/local/bin/egdb
>> > >
>> > > But I can't remember what I have done. I can only remember I modified
>> > > /etc/installurl before.
>> > >
>> > > Thanks!
>> > > Best Regards
>> > > Nan Xiao
>> > >
>> > >
>> > > On Sat, Jul 7, 2018 at 8:23 PM, Stuart Henderson 
>> > > wrote:
>> > >> On 2018-07-07, Nan Xiao  wrote:
>> > >>> Hi Philip,
>> > >>>
>> > >>> Thanks very much for your time and effort!
>> > >>>
>> > >>> The following is the command output:
>> > >>>
>> > >>> $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print
>> > >>> ($5+0)/1024}'
>> > >>> 88.4844
>> > >>>
>> > >>> The same as yours.
>> > >>
>> > >> That is from -current.
>> > >>
>> > >>> Honestly, I am not sure whether the package is for -stable or
>> > >>> -current.
>> > >>>
>> > >>> After installation, I just add following config in /etc/installurl:
>> > >>> $ cat /etc/installurl
>> > >>> https://ftp.openbsd.org/pub/OpenBSD
>> > >>>
>> > >>> Then I use "pkg_add -u" sometimes. Doesn't
>> > >>> https://ftp.openbsd.org/pub/OpenBSD guarantee it selects correct
>> > >>> packages? Or I miss something?
>> > >>
>> > >> Do you have PKG_PATH set in the environment?
>> > >>
>> > >> Whatever the reason, it looks like you have a -current version of the
>> > >> gdb package installed.
>> > >>
>> > >> The one in 6.3 should look like this:
>> > >>
>> > >> $ ls -l /usr/local/bin/egdb
>> > >> -rwxr-xr-x  1 root  bin  9452688 Mar 28 00:40 /usr/local/bin/egdb
>> > >>
>> > >> $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print($5+0)/1024}'
>> > >> 0.0078125
>> > >>
>> > >>
>> > >
>> >
>> >
>> >
>> > --
>> > Kindest regards,
>> > Tom Smyth
>> >
>> > Mobile: +353 87 6193172
>> > The information contained in this E-mail is intended only for the
>> > confidential use of the named recipient. If the reader of this message
>> > is not the intended recipient or the person responsible for
>> > delivering it to the recipient, you are hereby notified that you have
>> > received this communication in error and that any review,
>> > dissemination or copying of this communication is strictly prohibited.
>> > If you have received this in error, please notify the sender
>> > immediately by telephone at the number above and erase the message
>> > You are requested to carry out your own virus check before
>> > opening any attachment.



-- 
Kindest regards,
Tom Smyth

Mobile: +353 87 6193172
The information contained in this E-mail is intended only for the
confidential use of the named recipient. If the reader of this message
is not the intended recipient or the person responsible for
delivering it to the recipient, you are hereby notified that you have
received this communication in error and that any review,
dissemination or copying of this communication is strictly prohibited.
If you have received this in error, please notify the sender
immediately by telephone at the number above and erase the message
You are 

Re: "Cannot allocate memory" error when memory is enough

2018-07-07 Thread Tom Smyth
Hi otto

I must check that last time i read man page  it was related it was for
syspatch


Thanks



On Sat 7 Jul 2018, 17:07 Otto Moerbeek,  wrote:

> On Sat, Jul 07, 2018 at 03:52:44PM +0100, Tom Smyth wrote:
>
> > Hello Nan,
> > you need to set the PKG_path as Stuart suggested to install packages
> using
> >
> > pkg_add command
> >
> > for example to use fastly cdn  mirror you would set your pkg_path
> variable as
> > shown below
> >
> > export PKG_PATH=https://fastly.cdn.openbsd.org/pub/OpenBSD/$(uname
> > -r)/packages/$(uname -p)/
> >
> > /etc/installurl  file is for the syspatch utility to install binary
> > patches for the release
>
> Wrong. installurl *is* used by pkg_add. Read the man page.
>
> -Otto
> >
> >
> >
> > if you are using current ... Packages  are less straight forward as
> > packages and current
> > are modified regularly updated
> > so if you go to install a package from today on a current snapshot from
> 1 week
> > ago it is not guaranteed to work
> >
> > i believe there are few ways around this
> > 1) install the packages that you expect to use on current as soon as
> possible
> > after install
> > 2) if you must use that version of current for some reason ... when
> downloading
> > the current install iso / install image, download the contents of the
> > entire package
> > directory for current also. (on the same day )  your millage on this
> > will vary  depending
> > on what work is being done on the tree at the time
> >
> > and if anyone else uses a  better way id love to know also
> >
> >
> > I hope this helps
> >
> >
> > On 7 July 2018 at 15:26, Nan Xiao  wrote:
> > > HI Stuart,
> > >
> > > Thanks for your reply!
> > >
> > > I don't set PKG_PATH environment.
> > >
> > > Yes, it seems I installed the current package:
> > > $ ls -l /usr/local/bin/egdb
> > > -rwxr-xr-x  1 root  bin  10040410 Jun 28 19:03 /usr/local/bin/egdb
> > >
> > > But I can't remember what I have done. I can only remember I modified
> > > /etc/installurl before.
> > >
> > > Thanks!
> > > Best Regards
> > > Nan Xiao
> > >
> > >
> > > On Sat, Jul 7, 2018 at 8:23 PM, Stuart Henderson 
> wrote:
> > >> On 2018-07-07, Nan Xiao  wrote:
> > >>> Hi Philip,
> > >>>
> > >>> Thanks very much for your time and effort!
> > >>>
> > >>> The following is the command output:
> > >>>
> > >>> $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print ($5+0)/1024}'
> > >>> 88.4844
> > >>>
> > >>> The same as yours.
> > >>
> > >> That is from -current.
> > >>
> > >>> Honestly, I am not sure whether the package is for -stable or
> -current.
> > >>>
> > >>> After installation, I just add following config in /etc/installurl:
> > >>> $ cat /etc/installurl
> > >>> https://ftp.openbsd.org/pub/OpenBSD
> > >>>
> > >>> Then I use "pkg_add -u" sometimes. Doesn't
> > >>> https://ftp.openbsd.org/pub/OpenBSD guarantee it selects correct
> > >>> packages? Or I miss something?
> > >>
> > >> Do you have PKG_PATH set in the environment?
> > >>
> > >> Whatever the reason, it looks like you have a -current version of the
> > >> gdb package installed.
> > >>
> > >> The one in 6.3 should look like this:
> > >>
> > >> $ ls -l /usr/local/bin/egdb
> > >> -rwxr-xr-x  1 root  bin  9452688 Mar 28 00:40 /usr/local/bin/egdb
> > >>
> > >> $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print($5+0)/1024}'
> > >> 0.0078125
> > >>
> > >>
> > >
> >
> >
> >
> > --
> > Kindest regards,
> > Tom Smyth
> >
> > Mobile: +353 87 6193172
> > The information contained in this E-mail is intended only for the
> > confidential use of the named recipient. If the reader of this message
> > is not the intended recipient or the person responsible for
> > delivering it to the recipient, you are hereby notified that you have
> > received this communication in error and that any review,
> > dissemination or copying of this communication is strictly prohibited.
> > If you have received this in error, please notify the sender
> > immediately by telephone at the number above and erase the message
> > You are requested to carry out your own virus check before
> > opening any attachment.
>


Re: "Cannot allocate memory" error when memory is enough

2018-07-07 Thread Otto Moerbeek
On Sat, Jul 07, 2018 at 03:52:44PM +0100, Tom Smyth wrote:

> Hello Nan,
> you need to set the PKG_path as Stuart suggested to install packages using
> 
> pkg_add command
> 
> for example to use fastly cdn  mirror you would set your pkg_path variable as
> shown below
> 
> export PKG_PATH=https://fastly.cdn.openbsd.org/pub/OpenBSD/$(uname
> -r)/packages/$(uname -p)/
> 
> /etc/installurl  file is for the syspatch utility to install binary
> patches for the release

Wrong. installurl *is* used by pkg_add. Read the man page.

-Otto
> 
> 
> 
> if you are using current ... Packages  are less straight forward as
> packages and current
> are modified regularly updated
> so if you go to install a package from today on a current snapshot from 1 week
> ago it is not guaranteed to work
> 
> i believe there are few ways around this
> 1) install the packages that you expect to use on current as soon as possible
> after install
> 2) if you must use that version of current for some reason ... when 
> downloading
> the current install iso / install image, download the contents of the
> entire package
> directory for current also. (on the same day )  your millage on this
> will vary  depending
> on what work is being done on the tree at the time
> 
> and if anyone else uses a  better way id love to know also
> 
> 
> I hope this helps
> 
> 
> On 7 July 2018 at 15:26, Nan Xiao  wrote:
> > HI Stuart,
> >
> > Thanks for your reply!
> >
> > I don't set PKG_PATH environment.
> >
> > Yes, it seems I installed the current package:
> > $ ls -l /usr/local/bin/egdb
> > -rwxr-xr-x  1 root  bin  10040410 Jun 28 19:03 /usr/local/bin/egdb
> >
> > But I can't remember what I have done. I can only remember I modified
> > /etc/installurl before.
> >
> > Thanks!
> > Best Regards
> > Nan Xiao
> >
> >
> > On Sat, Jul 7, 2018 at 8:23 PM, Stuart Henderson  
> > wrote:
> >> On 2018-07-07, Nan Xiao  wrote:
> >>> Hi Philip,
> >>>
> >>> Thanks very much for your time and effort!
> >>>
> >>> The following is the command output:
> >>>
> >>> $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print ($5+0)/1024}'
> >>> 88.4844
> >>>
> >>> The same as yours.
> >>
> >> That is from -current.
> >>
> >>> Honestly, I am not sure whether the package is for -stable or -current.
> >>>
> >>> After installation, I just add following config in /etc/installurl:
> >>> $ cat /etc/installurl
> >>> https://ftp.openbsd.org/pub/OpenBSD
> >>>
> >>> Then I use "pkg_add -u" sometimes. Doesn't
> >>> https://ftp.openbsd.org/pub/OpenBSD guarantee it selects correct
> >>> packages? Or I miss something?
> >>
> >> Do you have PKG_PATH set in the environment?
> >>
> >> Whatever the reason, it looks like you have a -current version of the
> >> gdb package installed.
> >>
> >> The one in 6.3 should look like this:
> >>
> >> $ ls -l /usr/local/bin/egdb
> >> -rwxr-xr-x  1 root  bin  9452688 Mar 28 00:40 /usr/local/bin/egdb
> >>
> >> $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print($5+0)/1024}'
> >> 0.0078125
> >>
> >>
> >
> 
> 
> 
> -- 
> Kindest regards,
> Tom Smyth
> 
> Mobile: +353 87 6193172
> The information contained in this E-mail is intended only for the
> confidential use of the named recipient. If the reader of this message
> is not the intended recipient or the person responsible for
> delivering it to the recipient, you are hereby notified that you have
> received this communication in error and that any review,
> dissemination or copying of this communication is strictly prohibited.
> If you have received this in error, please notify the sender
> immediately by telephone at the number above and erase the message
> You are requested to carry out your own virus check before
> opening any attachment.



Re: "Cannot allocate memory" error when memory is enough

2018-07-07 Thread Tom Smyth
Hello Nan,
you need to set the PKG_path as Stuart suggested to install packages using

pkg_add command

for example to use fastly cdn  mirror you would set your pkg_path variable as
shown below

export PKG_PATH=https://fastly.cdn.openbsd.org/pub/OpenBSD/$(uname
-r)/packages/$(uname -p)/

/etc/installurl  file is for the syspatch utility to install binary
patches for the release



if you are using current ... Packages  are less straight forward as
packages and current
are modified regularly updated
so if you go to install a package from today on a current snapshot from 1 week
ago it is not guaranteed to work

i believe there are few ways around this
1) install the packages that you expect to use on current as soon as possible
after install
2) if you must use that version of current for some reason ... when downloading
the current install iso / install image, download the contents of the
entire package
directory for current also. (on the same day )  your millage on this
will vary  depending
on what work is being done on the tree at the time

and if anyone else uses a  better way id love to know also


I hope this helps


On 7 July 2018 at 15:26, Nan Xiao  wrote:
> HI Stuart,
>
> Thanks for your reply!
>
> I don't set PKG_PATH environment.
>
> Yes, it seems I installed the current package:
> $ ls -l /usr/local/bin/egdb
> -rwxr-xr-x  1 root  bin  10040410 Jun 28 19:03 /usr/local/bin/egdb
>
> But I can't remember what I have done. I can only remember I modified
> /etc/installurl before.
>
> Thanks!
> Best Regards
> Nan Xiao
>
>
> On Sat, Jul 7, 2018 at 8:23 PM, Stuart Henderson  wrote:
>> On 2018-07-07, Nan Xiao  wrote:
>>> Hi Philip,
>>>
>>> Thanks very much for your time and effort!
>>>
>>> The following is the command output:
>>>
>>> $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print ($5+0)/1024}'
>>> 88.4844
>>>
>>> The same as yours.
>>
>> That is from -current.
>>
>>> Honestly, I am not sure whether the package is for -stable or -current.
>>>
>>> After installation, I just add following config in /etc/installurl:
>>> $ cat /etc/installurl
>>> https://ftp.openbsd.org/pub/OpenBSD
>>>
>>> Then I use "pkg_add -u" sometimes. Doesn't
>>> https://ftp.openbsd.org/pub/OpenBSD guarantee it selects correct
>>> packages? Or I miss something?
>>
>> Do you have PKG_PATH set in the environment?
>>
>> Whatever the reason, it looks like you have a -current version of the
>> gdb package installed.
>>
>> The one in 6.3 should look like this:
>>
>> $ ls -l /usr/local/bin/egdb
>> -rwxr-xr-x  1 root  bin  9452688 Mar 28 00:40 /usr/local/bin/egdb
>>
>> $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print($5+0)/1024}'
>> 0.0078125
>>
>>
>



-- 
Kindest regards,
Tom Smyth

Mobile: +353 87 6193172
The information contained in this E-mail is intended only for the
confidential use of the named recipient. If the reader of this message
is not the intended recipient or the person responsible for
delivering it to the recipient, you are hereby notified that you have
received this communication in error and that any review,
dissemination or copying of this communication is strictly prohibited.
If you have received this in error, please notify the sender
immediately by telephone at the number above and erase the message
You are requested to carry out your own virus check before
opening any attachment.



Re: "Cannot allocate memory" error when memory is enough

2018-07-07 Thread Nan Xiao
HI Stuart,

Thanks for your reply!

I don't set PKG_PATH environment.

Yes, it seems I installed the current package:
$ ls -l /usr/local/bin/egdb
-rwxr-xr-x  1 root  bin  10040410 Jun 28 19:03 /usr/local/bin/egdb

But I can't remember what I have done. I can only remember I modified
/etc/installurl before.

Thanks!
Best Regards
Nan Xiao


On Sat, Jul 7, 2018 at 8:23 PM, Stuart Henderson  wrote:
> On 2018-07-07, Nan Xiao  wrote:
>> Hi Philip,
>>
>> Thanks very much for your time and effort!
>>
>> The following is the command output:
>>
>> $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print ($5+0)/1024}'
>> 88.4844
>>
>> The same as yours.
>
> That is from -current.
>
>> Honestly, I am not sure whether the package is for -stable or -current.
>>
>> After installation, I just add following config in /etc/installurl:
>> $ cat /etc/installurl
>> https://ftp.openbsd.org/pub/OpenBSD
>>
>> Then I use "pkg_add -u" sometimes. Doesn't
>> https://ftp.openbsd.org/pub/OpenBSD guarantee it selects correct
>> packages? Or I miss something?
>
> Do you have PKG_PATH set in the environment?
>
> Whatever the reason, it looks like you have a -current version of the
> gdb package installed.
>
> The one in 6.3 should look like this:
>
> $ ls -l /usr/local/bin/egdb
> -rwxr-xr-x  1 root  bin  9452688 Mar 28 00:40 /usr/local/bin/egdb
>
> $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print($5+0)/1024}'
> 0.0078125
>
>



Re: "Cannot allocate memory" error when memory is enough

2018-07-07 Thread Stuart Henderson
On 2018-07-07, Nan Xiao  wrote:
> Hi Philip,
>
> Thanks very much for your time and effort!
>
> The following is the command output:
>
> $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print ($5+0)/1024}'
> 88.4844
>
> The same as yours.

That is from -current.

> Honestly, I am not sure whether the package is for -stable or -current.
>
> After installation, I just add following config in /etc/installurl:
> $ cat /etc/installurl
> https://ftp.openbsd.org/pub/OpenBSD
>
> Then I use "pkg_add -u" sometimes. Doesn't
> https://ftp.openbsd.org/pub/OpenBSD guarantee it selects correct
> packages? Or I miss something?

Do you have PKG_PATH set in the environment?

Whatever the reason, it looks like you have a -current version of the
gdb package installed.

The one in 6.3 should look like this:

$ ls -l /usr/local/bin/egdb 
   
-rwxr-xr-x  1 root  bin  9452688 Mar 28 00:40 /usr/local/bin/egdb

$ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print($5+0)/1024}'
0.0078125




Re: "Cannot allocate memory" error when memory is enough

2018-07-07 Thread Nan Xiao
Hi Philip,

Thanks very much for your time and effort!

The following is the command output:

$ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print ($5+0)/1024}'
88.4844

The same as yours.

Honestly, I am not sure whether the package is for -stable or -current.

After installation, I just add following config in /etc/installurl:
$ cat /etc/installurl
https://ftp.openbsd.org/pub/OpenBSD

Then I use "pkg_add -u" sometimes. Doesn't
https://ftp.openbsd.org/pub/OpenBSD guarantee it selects correct
packages? Or I miss something?

Thanks very much in advance!
Best Regards
Nan Xiao


On Sat, Jul 7, 2018 at 1:08 PM, Philip Guenther  wrote:
> On Wed, Jul 4, 2018 at 6:31 PM Nan Xiao  wrote:
>>
>> Thanks very much for your time and patience. I run "syspatch" command
>> regularly, so it should be 6.3-stable.
>>
>>
>> My full dmesg output is here:
>
> ...
> Okay, nothing weird in there.
>
>
>> And full ouput of "vmstat -m":
>
>
> Nothing stands out in that output either, with nothing showing failures or
> consuming much more than might be expected.
>
> So, I'm back to my theory that the programs that are failing to run for you
> are from packages built for -current and not -stable and have
> PT_OPENBSD_RANDOMIZE segments larger than are permitted by -stable.
>
> For example, the gdb-7.12.1p2 package in -current has an 88kB
> PT_OPENBSD_RANDOMIZE segment:
>
> : morgaine; readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print
> ($5+0)/1024}
> 88.4844
> : morgaine;
>
> That's bigger than what a -stable kernel will permit.
>
> So, what's the output of that command for the egdb binary that fails for
> you, and how confident are you that it's from a -stable package and not a
> -current package?
>
>
> Philip Guenther
>



Re: "Cannot allocate memory" error when memory is enough

2018-07-06 Thread Philip Guenther
On Wed, Jul 4, 2018 at 6:31 PM Nan Xiao  wrote:

> Thanks very much for your time and patience. I run "syspatch" command
> regularly, so it should be 6.3-stable.
>

> My full dmesg output is here:
>
...
Okay, nothing weird in there.


And full ouput of "vmstat -m":
>

Nothing stands out in that output either, with nothing showing failures or
consuming much more than might be expected.

So, I'm back to my theory that the programs that are failing to run for you
are from packages built for -current and not -stable and have
PT_OPENBSD_RANDOMIZE segments larger than are permitted by -stable.

For example, the gdb-7.12.1p2 package in -current has an 88kB
PT_OPENBSD_RANDOMIZE segment:

: morgaine; readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print
($5+0)/1024}
88.4844
: morgaine;

That's bigger than what a -stable kernel will permit.

So, what's the output of that command for the egdb binary that fails for
you, and how confident are you that it's from a -stable package and not a
-current package?


Philip Guenther


Re: "Cannot allocate memory" error when memory is enough

2018-07-04 Thread Nan Xiao
Hi Philip,

Thanks very much for your time and patience. I run "syspatch" command
regularly, so it should be 6.3-stable.

My full dmesg output is here:

OpenBSD 6.3 (RAMDISK_CD) #98: Sat Mar 24 14:26:39 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 4228214784 (4032MB)
avail mem = 4096286720 (3906MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe1840 (41 entries)
bios0: vendor FUJITSU // Phoenix Technologies Ltd. version "Version
1.06" date 01/16/2009
bios0: FUJITSU LifeBook T5010
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP HPET MCFG SSDT SSDT APIC BOOT SLIC SSDT
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz, 2527.30 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: apic clock running at 266MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2.1.3, IBE
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P2)
acpiprt2 at acpi0: bus 8 (RP01)
acpiprt3 at acpi0: bus 16 (RP02)
acpiprt4 at acpi0: bus 24 (RP03)
acpiprt5 at acpi0: bus -1 (RP05)
acpiprt6 at acpi0: bus 56 (PCIB)
acpiec0 at acpi0
acpicpu at acpi0 not configured
acpitz at acpi0 not configured
acpitz at acpi0 not configured
"FUJ02BF" at acpi0 not configured
"FUJ02E5" at acpi0 not configured
"FUJ02B1" at acpi0 not configured
"SYN1F01" at acpi0 not configured
"FUJ02E3" at acpi0 not configured
"ACPI0003" at acpi0 not configured
"PNP0C0A" at acpi0 not configured
"PNP0C0A" at acpi0 not configured
"PNP0C0D" at acpi0 not configured
"PNP0C0C" at acpi0 not configured
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
wsdisplay1 at vga1 mux 1: console (80x25, vt100 emulation)
"Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
em0 at pci0 dev 25 function 0 "Intel ICH9 IGP M AMT" rev 0x03: msi,
address 00:23:26:5e:36:bc
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 2 int 16
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 2 int 17
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 2 int 18
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 2 int 18
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev
2.00/1.00 addr 1
"Intel 82801I HD Audio" rev 0x03 at pci0 dev 27 function 0 not configured
ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03: msi
pci1 at ppb0 bus 8
ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03: msi
pci2 at ppb1 bus 16
ppb2 at pci0 dev 28 function 2 "Intel 82801I PCIE" rev 0x03: msi
pci3 at ppb2 bus 24
iwn0 at pci3 dev 0 function 0 "Intel WiFi Link 5300" rev 0x00: msi,
MIMO 3T3R, MoW, address 00:21:6a:4f:20:5a
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x03: apic 2 int 23
uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x03: apic 2 int 19
uhci5 at pci0 dev 29 function 2 "Intel 82801I USB" rev 0x03: apic 2 int 18
ehci1 at pci0 dev 29 function 7 "Intel 82801I USB" rev 0x03: apic 2 int 23
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev
2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x93
pci4 at ppb3 bus 56
cbb0 at pci4 dev 3 function 0 "O2 Micro OZ711SP1 CardBus" rev 0x01:
apic 2 int 17
cbb1 at pci4 dev 3 function 1 "O2 Micro OZ711SP1 CardBus" rev 0x01:
apic 2 int 17
sdhc0 at pci4 dev 3 function 2 "O2 Micro OZ711MP1 SDHC" rev 0x02: apic 2 int 17
sdhc0: SDHC 3.0, 33 MHz base clock
sdmmc0 at sdhc0: 4-bit
"O2 Micro OZ711MP1 XDHC" rev 0x01 at pci4 dev 3 function 3 not configured
"O2 Micro Firewire" rev 0x02 at pci4 dev 3 function 4 not configured
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 57 device 0 cacheline 0x0, lattimer 0x20
pcmcia0 at cardslot0
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 57 device 0 cacheline 0x0, lattimer 0x20
pcmcia1 at cardslot1
"Intel 82801IEM LPC" rev 0x03 at pci0 dev 31 function 0 not configured
ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x03: msi, AHCI 1.2
ahci0: port 0: 3.0Gb/s
ahci0: port 1: 1.5Gb/s
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0:  SCSI3
0/direct fixed naa.50e043a28e8c
sd0: 305245MB, 512 bytes/sector, 625142448 sectors
cd0 at scsibus0 targ 1 lun 0:  ATAPI
5/cdrom removable
"Intel 82801I SMBus" rev 0x03 at pci0 dev 31 function 3 not configured
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev
1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 

Re: "Cannot allocate memory" error when memory is enough

2018-07-04 Thread Philip Guenther
On Wed, Jul 4, 2018 at 12:57 AM Nan Xiao  wrote:

> My OS is 6.3. I already use "pkg_add -u" to upgrade all installed
> packages. cmake and egdb are are installed by "pkg_add", not compiled
> by me.
>

You don't mention -release, or -stable, or -current, which is utterly
critical: 6.3-release and 6.3-stable are not guaranteed to run -current
packages, and ditto for even merely an older -current kernel+base vs fresh
-current packages.  Your messages continue to lack these critical details,
which is why we tell everyone to *include your full dmesg output*.  That
would have instantly answered what version you were running and how out of
date (or not) it is!



>  "vmstat -m" gives some information:
>
> $ vmstat -m
>

...but you trimmed out most of what would show failures or odd consumption
patterns.


It seems kernel dynamic memory is run out, and devbuf and temp consume
> most of the space.
>

What I saw in the output doesn't indicate that.


Philip Guenther


Re: "Cannot allocate memory" error when memory is enough

2018-07-04 Thread Nan Xiao
HI Philip,

Thanks very much for your detailed explanation!

My OS is 6.3. I already use "pkg_add -u" to upgrade all installed
packages. cmake and egdb are are installed by "pkg_add", not compiled
by me.

 "vmstat -m" gives some information:

$ vmstat -m
Memory statistics by bucket size
Size   In Use   Free   Requests  HighWater  Couldfree
  16  752   283226592131280  3
  32  482   1054 691465 640 99
  64  622   41141023682 320 191519
 128 4496560   27265523 1603596104
 256  164364 107121  80  19059
 512  387197  63372  40  18454
1024 1507  5 125086  20  0
2048   36  4   2193  10  0
4096  555  1  80673   5  0
8192  207  1450   5  0
   16384   10  0 15   5  0
   327689  0  29163   5  0
   655369  0   21946371   5  0
  2621443  0  3   5  0
  5242882  0  2   5  0

..

Memory statistics by type   Type  Kern
  Type InUse MemUse HighUse  Limit Requests Limit Limit Size(s)
devbuf  2991  7220K   7220K 78644K   1463470 0
16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,262144,524288
..
   dirhash   678   130K239K 78644K183870 0
16,32,64,128,256,512
  ..
  ttys   408  1724K   1724K 78644K  4080 0
512,1024,4096,8192
  ..
   VM swap 7   299K299K 78644K70 0
16,64,2048,262144
  UVM amap   29512K441K 78644K  43028130 0
16,32,64,128,256,512
  ..
  temp54  2082K   2211K 78644K 228087350 0
16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,524288
 ..
   DRM   275   114K116K 78644K 14100 0
16,32,64,128,256,512,1024,2048,4096,16384

Memory Totals:  In UseFreeRequests
12378K619K53994333
Memory resource pool statistics
NameSize Requests FailInUse Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
phpool   112849530 4236   125 1   124   124 0 80
extentpl  40  1260   48 1 0 1 1 0 80
pmappl   192662210   34   105   103 2 3 0 80
..
In use 34552K, total allocated 40384K; utilization 85.6%


It seems kernel dynamic memory is run out, and devbuf and temp consume
most of the space.

Could you give some suggestions? Thanks very much in advance!
Best Regards
Nan Xiao


On Wed, Jul 4, 2018 at 10:57 AM, Philip Guenther  wrote:
> On Tue, 3 Jul 2018, Philip Guenther wrote:
> 
>
> Flakey button on my mouse; time to clean it again and throw it out if it
> keeps glitching.  Sorry about that.
>
>
>> On Tue, Jul 3, 2018 at 4:53 PM Nan Xiao  wrote:
>> > Thanks for your reply! The "ulimit -a" outputs following:
>> >
>> > $ ulimit -a
>> > time(cpu-seconds)unlimited
>> > file(blocks) unlimited
>> > coredump(blocks) unlimited
>> > data(kbytes) 33554432
>> > stack(kbytes)8192
>> > lockedmem(kbytes)1332328
>> > memory(kbytes)   3978716
>> > nofiles(descriptors) 128
>> > processes1310
>> >
>> > It seems should be enough to launch cmake or egdb.
>
> But it wasn't and the kernel can only indicate that with a single error
> code, so now you have to actually dig into what's going on.  There are
> many possibilities, as a search for ENOMEM in /usr/src/sys/kern/*exec*.c
> will show.
> 1) the ELF interpreter (normal ld.so) could be too large
> 2) the PT_OPENBSD_RANDOMIZE segment could be larger than permitted by the
>kernel
> 3) program's text segment could exceed the maximum for the arch, MAXTSIZ
> 4) the program's vnode couldn't be mmaped for some reason
> 5) the argument list and environment were together too big for the stack
> 6) the signal trampoline couldn't be mapped into the process VM
> 7) other random memory allocation problems
>
> Of those, (1), (4), and (6) are *really* unlikely.  (3) is possible if
> you're building a debugging binary that's *huge* as a result.  (5) would
> result in _all_ programs failing in that shell.  I think (7) would show up
> in a close examination of the "vmstat -m" output.
>
> (2) is perhaps the most likely, as recent compiler changes have increased
> the expected size of the PT_OPENBSD_RANDOMIZE segment and while the kernel
> limit on that was also increased recently, you didn't provide any
> information about your setup: are your kernel, userland, and ports all in
> sync?
>
>
> Philip Guenther



Re: "Cannot allocate memory" error when memory is enough

2018-07-03 Thread Philip Guenther
On Tue, 3 Jul 2018, Philip Guenther wrote:


Flakey button on my mouse; time to clean it again and throw it out if it 
keeps glitching.  Sorry about that.


> On Tue, Jul 3, 2018 at 4:53 PM Nan Xiao  wrote:
> > Thanks for your reply! The "ulimit -a" outputs following:
> >
> > $ ulimit -a
> > time(cpu-seconds)unlimited
> > file(blocks) unlimited
> > coredump(blocks) unlimited
> > data(kbytes) 33554432
> > stack(kbytes)8192
> > lockedmem(kbytes)1332328
> > memory(kbytes)   3978716
> > nofiles(descriptors) 128
> > processes1310
> >
> > It seems should be enough to launch cmake or egdb.

But it wasn't and the kernel can only indicate that with a single error 
code, so now you have to actually dig into what's going on.  There are 
many possibilities, as a search for ENOMEM in /usr/src/sys/kern/*exec*.c 
will show.
1) the ELF interpreter (normal ld.so) could be too large
2) the PT_OPENBSD_RANDOMIZE segment could be larger than permitted by the 
   kernel
3) program's text segment could exceed the maximum for the arch, MAXTSIZ
4) the program's vnode couldn't be mmaped for some reason
5) the argument list and environment were together too big for the stack
6) the signal trampoline couldn't be mapped into the process VM
7) other random memory allocation problems

Of those, (1), (4), and (6) are *really* unlikely.  (3) is possible if 
you're building a debugging binary that's *huge* as a result.  (5) would 
result in _all_ programs failing in that shell.  I think (7) would show up 
in a close examination of the "vmstat -m" output.

(2) is perhaps the most likely, as recent compiler changes have increased 
the expected size of the PT_OPENBSD_RANDOMIZE segment and while the kernel 
limit on that was also increased recently, you didn't provide any 
information about your setup: are your kernel, userland, and ports all in 
sync?


Philip Guenther



Re: "Cannot allocate memory" error when memory is enough

2018-07-03 Thread Philip Guenther
On Tue, Jul 3, 2018 at 4:53 PM Nan Xiao  wrote:

> Thanks for your reply! The "ulimit -a" outputs following:
>
> $ ulimit -a
> time(cpu-seconds)unlimited
> file(blocks) unlimited
> coredump(blocks) unlimited
> data(kbytes) 33554432
> stack(kbytes)8192
> lockedmem(kbytes)1332328
> memory(kbytes)   3978716
> nofiles(descriptors) 128
> processes1310
>
> It seems should be enough to launch cmake or egdb.
>
> Thanks!
> Best Regards
> Nan Xiao
>
>
> On Tue, Jul 3, 2018 at 9:37 PM, Marc Espie  wrote:
> > On Tue, Jul 03, 2018 at 05:31:22PM +0800, Nan Xiao wrote:
> >> Hi all,
> >>
> >> Greeting from me!
> >>
> >> I am running OpenBSD 6.3, and don't know from when, loading some
> >> binary will prompt "Cannot allocate memory":
> >>
> >> $ egdb
> >> ksh: egdb: Cannot allocate memory
> >>
> >> $ cmake
> >> ksh: cmake: Cannot allocate memory
> >>
> >> But the memory seems enough:
> >> $top
> >> ..
> >> Memory: Real: 57M/1365M act/tot Free: 2546M Cache: 925M Swap: 0K/4103M
> >> ..
> >>
> >> I try to use "ktrace/kdump" tool, but can't find something special:
> >> ..
> >>  21881 ktrace   NAMI  "/usr/local/bin/egdb"
> >>  21881 ktrace   RET   execve -1 errno 12 Cannot allocate memory
> >> ..
> >>
> >> Could anyone give some clues? Thanks very much in advance!
> >> Best Regards
> >> Nan Xiao
> >
> > Check your limits.
> >
> > ulimit -a
> >
> > from the shell will tell you what's wrong.
> >
> > you might also need to brush up on login.conf  and get your user into
> > a different class.
>
>


Re: "Cannot allocate memory" error when memory is enough

2018-07-03 Thread Nan Xiao
Hi Marc,

Thanks for your reply! The "ulimit -a" outputs following:

$ ulimit -a
time(cpu-seconds)unlimited
file(blocks) unlimited
coredump(blocks) unlimited
data(kbytes) 33554432
stack(kbytes)8192
lockedmem(kbytes)1332328
memory(kbytes)   3978716
nofiles(descriptors) 128
processes1310

It seems should be enough to launch cmake or egdb.

Thanks!
Best Regards
Nan Xiao


On Tue, Jul 3, 2018 at 9:37 PM, Marc Espie  wrote:
> On Tue, Jul 03, 2018 at 05:31:22PM +0800, Nan Xiao wrote:
>> Hi all,
>>
>> Greeting from me!
>>
>> I am running OpenBSD 6.3, and don't know from when, loading some
>> binary will prompt "Cannot allocate memory":
>>
>> $ egdb
>> ksh: egdb: Cannot allocate memory
>>
>> $ cmake
>> ksh: cmake: Cannot allocate memory
>>
>> But the memory seems enough:
>> $top
>> ..
>> Memory: Real: 57M/1365M act/tot Free: 2546M Cache: 925M Swap: 0K/4103M
>> ..
>>
>> I try to use "ktrace/kdump" tool, but can't find something special:
>> ..
>>  21881 ktrace   NAMI  "/usr/local/bin/egdb"
>>  21881 ktrace   RET   execve -1 errno 12 Cannot allocate memory
>> ..
>>
>> Could anyone give some clues? Thanks very much in advance!
>> Best Regards
>> Nan Xiao
>
> Check your limits.
>
> ulimit -a
>
> from the shell will tell you what's wrong.
>
> you might also need to brush up on login.conf  and get your user into
> a different class.



Re: "Cannot allocate memory" error when memory is enough

2018-07-03 Thread Marc Espie
On Tue, Jul 03, 2018 at 05:31:22PM +0800, Nan Xiao wrote:
> Hi all,
> 
> Greeting from me!
> 
> I am running OpenBSD 6.3, and don't know from when, loading some
> binary will prompt "Cannot allocate memory":
> 
> $ egdb
> ksh: egdb: Cannot allocate memory
> 
> $ cmake
> ksh: cmake: Cannot allocate memory
> 
> But the memory seems enough:
> $top
> ..
> Memory: Real: 57M/1365M act/tot Free: 2546M Cache: 925M Swap: 0K/4103M
> ..
> 
> I try to use "ktrace/kdump" tool, but can't find something special:
> ..
>  21881 ktrace   NAMI  "/usr/local/bin/egdb"
>  21881 ktrace   RET   execve -1 errno 12 Cannot allocate memory
> ..
> 
> Could anyone give some clues? Thanks very much in advance!
> Best Regards
> Nan Xiao

Check your limits.

ulimit -a

from the shell will tell you what's wrong.

you might also need to brush up on login.conf  and get your user into
a different class.



"Cannot allocate memory" error when memory is enough

2018-07-03 Thread Nan Xiao
Hi all,

Greeting from me!

I am running OpenBSD 6.3, and don't know from when, loading some
binary will prompt "Cannot allocate memory":

$ egdb
ksh: egdb: Cannot allocate memory

$ cmake
ksh: cmake: Cannot allocate memory

But the memory seems enough:
$top
..
Memory: Real: 57M/1365M act/tot Free: 2546M Cache: 925M Swap: 0K/4103M
..

I try to use "ktrace/kdump" tool, but can't find something special:
..
 21881 ktrace   NAMI  "/usr/local/bin/egdb"
 21881 ktrace   RET   execve -1 errno 12 Cannot allocate memory
..

Could anyone give some clues? Thanks very much in advance!
Best Regards
Nan Xiao