Fwd: Re: I found a sort bug! - How to sort big files?

2015-03-15 Thread sort problem
Whoops. At least I thought it helped. The default sort with the -H worked for 
132 minutes then said: no space left in /home (that had before the sort 
command: 111 GBytes FREE). And btw, df command said for free space: -18 
GByte, 104%.. what? Some kind of reserved space for root?


Why does it takes more then 111 GBytes to sort -u ~600 MByte sized files? 
This in nonsense. 


So the default sort command is a  big pile of shit when it comes to files 
bigger then 60 MByte? .. lol

I can send the ~600 MByte txt files compressed if needed...

I was suprised... sort is a very old command..


 Original Message 
From: sort problem sortprob...@safe-mail.net
To: andreas.zeilme...@mailbox.org
Cc: misc@openbsd.org
Subject: Re: I found a sort bug! - How to sort big files?
Date: Sat, 14 Mar 2015 08:39:55 -0400

o.m.g. It works. 

Why doesn't sort uses this by default on files larger then 60 MByte? 

Thanks!

 Original Message 
From: Andreas Zeilmeier andreas.zeilme...@mailbox.org
Apparently from: owner-misc+m147...@openbsd.org
To: misc@openbsd.org
Subject: Re: I found a sort bug! - How to sort big files?
Date: Sat, 14 Mar 2015 13:16:05 +0100

 On 03/14/15 12:49, sort problem wrote:
  Hello, 
  
  --
  # uname -a
  OpenBSD notebook.lan 5.6 GENERIC.MP#333 amd64
  # 
  # du -sh small/ 
  
 
  663Msmall/
  # ls -lah small/*.txt | wc -l   
  
 
43
  # 
  # cd small
  # ulimit -n
  1000
  # sysctl | grep -i maxfiles
  kern.maxfiles=10
  # 
  # grep open /etc/login.conf 
  
 
  :openfiles-cur=10:\
  :openfiles-cur=128:\
  :openfiles-cur=512:\
  # 
  # sort -u *.txt -o out
  Segmentation fault (core dumped)
  # 
  --
  
  This is after a minute run.. The txt files have UTF-8 chars too. A line is 
  maximum a few ten chars long in the txt files. All the txt files have UNIX 
  eol's. There is enough storage, enough RAM, enough CPU. I'm even trying 
  this with root user. The txt files are about ~60 000 000 lines.. not a big 
  number... a reboot didn't help. 
  
  
  
  Any ideas how can I use the sort command to actually sort? Please help!
  
  
  
  Thanks, 
  
  btw, this happens on other UNIX OS too, lol... why do we have the sort 
  command if it doesn't work?
  
 
 Hi,
 
 have you tried the option '-H'?
 The manpage suggested this for files  60MB.
 
 
 Regards,
 
 Andi



Re: running multiple simultaneous X sessions as different users

2015-03-15 Thread luke350

On 03/15/15 04:15, Miod Vallat wrote:

If you run another X server instance, it will use the seventh virtual
console (ctrl-alt-F7). But I am not sure drm-enabled X servers can run
multiple instances.


Thanks. Is there a way to turn off drm, such as via a sysctl setting for 
kern.malloc.kmemstat.DRM, or somehow forcing it to use a different 
(known stable) driver?  Or, if not, anything else I can try except 
non-drm video hardware?




Re: OpenBSD as base OS for Virtualization

2015-03-15 Thread Jiri B
On Sun, Mar 15, 2015 at 10:28:15AM +0200, Ruslanas Gžibovskis wrote:
 You mentioned QEMU, for example, so is there some more examples?

I don't want to be ugly but have you tried to do your homework
at least? Check qemu in ports, there's README file as an example.

 Solaris Containers, have ability to use branded zones, and there we can
 launch Linux Gernel and setup Debian.
 It also integrates and fully uses ZFS features, yes it's native, born in
 Solaris
 :) what I miss in lxc... :(

I believe nobody would stop you to implement zones/containers
for OpenBSD, hahaha. But reality is, nothing such that exists
now.

OpenBSD is primarily an UNIX OS, not virtualization host
or embedded OS. First get the project focus before doing
strong conclusions (what a poor virtualization support as
an example...).

j.



Re: Installation panic on boot

2015-03-15 Thread Stuart Henderson
On 2015-03-15, The Aviator aviator45...@gmail.com wrote:
 I don't get to a terminal, but the dmesg is at the relevant lines I can
 think of
 (copied by human):

 ioapic0 at mainbus0: apid 2 pa 0xfec0, version 21, 24 pins
 ioapic0: misconfigured as apic 0, remapped to apid 2
 LoadTable
 panic: aml_die aml_parse:3992

 Details:
 This happens using both the mini installation media or the full
 installation media,
 version 5.6 for amd64 copied from ftp.openbsd.org
 The hardware is an AMD, 64 bit Thinkpad Edge E545.
 I am booting from a flash drive (if that means anything).
 The current hard drive in the system is totally blank.
 Same error on mini install media from the 57 snapshot, with an altered line
 number
 (3986 instead of 3992).

 Thank you.



Are you able to run another operating system on the machine and get
acpidump output files?



Re: Diffs for OpenBSD /src

2015-03-15 Thread Alexander Hall
On March 15, 2015 9:49:11 AM GMT+01:00, Raf Czlonka rczlo...@gmail.com wrote:
On Sat, Mar 14, 2015 at 07:44:38PM GMT, Alexander Hall wrote:

 cvs diff -uNp,  even. :-) 

On an OpenBSD system, '/etc/skel' contains '.cvsrc', which itself
contains the line:

diff -uNp

So if one has created a local account the standard way using the
defaults, then '.cvsrc' will end up in your $HOME, which in turn will
make specifying the above options redundant.

Indeed. I have however been bitten by the up -P (or -dP?) in there, so I'm not 
too fond of those defaults. I always do cvs -q up -dAP by finger memory (or 
shell command history) anyway. :)

/Alexander 



Re: [Bulk] Re: httpd presenting the wrong TLS certificate

2015-03-15 Thread Kevin Chadwick
On Sat, 14 Mar 2015 19:39:01 -0300
Hugo Osvaldo Barrera wrote:

 Oh, I hadn't checked that for SNI. I'll have to wait then; multiple IPv4
 addresses are expensive, and CAs will charge for wildcard certs. :(
 
 Is SNI on the roadmap already?

pound proxy does SNI and works well on port 443 in front of httpd 



Re: OpenBSD as base OS for Virtualization

2015-03-15 Thread Ruslanas Gžibovskis
Thanks to all.

Hi Steven,

You mentioned QEMU, for example, so is there some more examples?
Solaris Containers, have ability to use branded zones, and there we can
launch Linux Gernel and setup Debian.
It also integrates and fully uses ZFS features, yes it's native, born in
Solaris
:) what I miss in lxc... :(

Yes I know, that bhyve is a FreeBSD project, and listen to:
http://www.openbsd.org/lyrics.html#42


Hi Jiri,

Is it something similar to solaris LDoms? On SPARC HW? Just interested.

vmware ESXi ... I was using it, but once my VMware hanged once in a VM
I have mounted two iso files and started copying ISO content to VM... It
ate
all my RAM and then all my CPU... and purple screen of death...

QEMU I was trying, but... what? max 2GB RAM? at least in Linux env...
Does QEMU has this limitation in OpenBSD?

To All again:

What FS supported by OpenBSD? UFS? ZFS?


And in conclusion: chroot and qemu for virtualization on OpenBSD?
sounds really poor... :(

On 14 March 2015 at 20:39, Gene gh5...@gmail.com wrote:



 On Sat, Mar 14, 2015 at 10:56 AM, Jiri B ji...@devio.us wrote:

 On Sat, Mar 14, 2015 at 01:44:47PM +0200, Ruslanas Gžibovskis wrote:
  So question is:
  What Virtualization solutions OpenBSD support?

 OpenBSD supports SPARC ldomains, but you have to have
 SPARC hw :P

 There is support of some virtio devices (vio, vioblock,
 broken vioscsi, vio balloon...) which are supported by
 qemu/kvm, xen.

 There's at least one developer using ESXi thus he/they
 take care of needed drivers (vmx).

 Even I like ESXi the most, I would go with KVM or Xen
 if x86 HW is used. Why? ESXi has very restricted features
 in free version. KVM/Xen distributions offer you
 much more features (live migration, etc...) and they
 are also OSS.

 Xen got finally some nice web ui (watching just pictures)
 https://xen-orchestra.com/#/...


 Xen Orchestra was not created by nor is it supported by the Xen Project.

 There are a lot of different front-end managers for Xen out there.

 -Gene




--
Ruslanas Gžibovskis
+370 6030 7030



Re: httpd presenting the wrong TLS certificate

2015-03-15 Thread Stuart Henderson
On 2015-03-14, Hugo Osvaldo Barrera h...@barrera.io wrote:
 On 2015-03-14 23:34, Peter Hessler wrote:
 httpd does not yet support SNI.  You will need to either wait, use a
 wildcard SSL cert, or use different ports/IPs.



 Oh, I hadn't checked that for SNI. I'll have to wait then; multiple IPv4
 addresses are expensive, and CAs will charge for wildcard certs. :(

Another option is to use a certificate with multiple subjectAlternativeNames.
Usually more expensive than a standard cert, but cheaper than wildcard.



Installation panic on boot

2015-03-15 Thread The Aviator
I don't get to a terminal, but the dmesg is at the relevant lines I can
think of
(copied by human):

ioapic0 at mainbus0: apid 2 pa 0xfec0, version 21, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
LoadTable
panic: aml_die aml_parse:3992

Details:
This happens using both the mini installation media or the full
installation media,
version 5.6 for amd64 copied from ftp.openbsd.org
The hardware is an AMD, 64 bit Thinkpad Edge E545.
I am booting from a flash drive (if that means anything).
The current hard drive in the system is totally blank.
Same error on mini install media from the 57 snapshot, with an altered line
number
(3986 instead of 3992).

Thank you.



Re: Resume-from-suspend issue with Acer Notebook in OpenBSD 5.6/5.7 beta

2015-03-15 Thread Mike Larkin
On Sun, Mar 15, 2015 at 01:58:10AM -0400, Kevin Kwan wrote:
 Well, here's the thing - I am not even sure if it tried to load the
 hibernated image, or it failed in the middle, or it crashed after the
 load.
 When I powered it up after an s2d it went through the Acer logo, the boot
 prompt, the usual device laundry list shows up, the Intel graphics driver
 redrew the console, the USB configurations show up, one more line of text
 shows up for about 2 seconds, and then it was back to the Acer logo once
 again.
 
 I had to do the same thing multiple times just to catch the line at the
 very end:
 unhibernating @ block 12872447 length 31971840 bytes
 
 I made an annotated video of the entire experience here:
 
 https://www.youtube.com/watch?v=-GTWnES_134
 

ok you're failing in the early resume sequence, since that's shared between
both ZZZ and zzz resume paths.

I'll try to see if I have a similar machine to try to reproduce.

 
 
 On Sat, Mar 14, 2015 at 6:56 PM, Mike Larkin mlar...@azathoth.net wrote:
 
  On Sat, Mar 14, 2015 at 02:02:09PM -0400, Kevin Kwan wrote:
   Nope, hibernate/suspend to disk also causes a reset.  Is there anything
   else I should try?
 
  Hibernate resume will perform what looks like a full boot. Did you let it
  go through that or did you power off when you saw it booting again?
 
  Or did it load the hibernated image and *then* reboot?
 
  -ml
 
   On Mar 14, 2015 1:22 PM, Theo de Raadt dera...@cvs.openbsd.org
  wrote:
  
 My daily driver notebook is an Acer Aspire 1410 notebook.  Penryn-ULV
 Celeron, Intel GS45 chipset, Intel Centrino 6205 (iwn) swapping a
 non-supported Atheros AR2425, 6GB of RAM, normal everyday HDD.
Everything
 seems to work in OpenBSD 5.6 except for the fact that every time I
  put it
 on suspend (zzz), it suspends properly (LED indicators in the front
  goes
 from blue to blinking orange), but when I take it out of suspend it
  goes
 into instant amnesia, takes me back to the Acer boot logo,
   
You mean the machine resets.
   
 Okay, what should be my next steps here?  I see from precursory
  Google
 searches that the Linux guys had this problem back in the old Kernel
  3.3
 days, and their workaround involves passing grub the i8042.reset
parameter,
 which seems to tell the on-board keyboard controller to clean up its
  own
 mess.  Any similar directives I can use here?
   
Highly unlikely.
   
Thanks for including all the information in the report.  Result is a
few people can glance over it and look for hints (as I am about to
do).  Unfortunately the few rare suspend/resume issues we see are
pretty hard to diagnose without access to failing machines.
   
One thing is missing from your report.  Does hibernate work?



Re: running multiple simultaneous X sessions as different users

2015-03-15 Thread Miod Vallat
 Now I finally (cough) notice those error messages in dmesg.boot. Not
 sure how critical they are, if it's referring to missing binary blobs,
 and if openbsd has fallen back to acceptable/stable defaults or
 something.  But where it says screen 1-5 added, that seems to connect
 with 'man wsdisplay' saying that screens can be
 configured with either the wsconscfg utility or a (kernel?)
 compile-time parameter.  I tried running things like wsconscfg 6 (
 7, 8), which return 0, but it didn't seem to change the behavior.

The kernel will attach WSDISPLAY_DEFAULTSCREENS virtual consoles by
default, which is 6 on i386 and amd64 platforms.

More virtual consoles (up to WSDISPLAY_MAXSCREEN, which is 12) can be
created by using wsconscfg as you did. Your dmesg output will report
something like:
  wsdisplay0: screen 6 added (std, vt100 emulation)

Now, for X to find a proper virtual console to run on, it has to find an
unused one, i.e. one where no getty(8) runs. This is controlled by
/etc/ttys, and in the default congfiguration of six virtual consoles,
only the fifth (ctrl-alt-F5) is left unused and available for X.

If you run another X server instance, it will use the seventh virtual
console (ctrl-alt-F7). But I am not sure drm-enabled X servers can run
multiple instances.

Miod



Re: Resume-from-suspend issue with Acer Notebook in OpenBSD 5.6/5.7 beta

2015-03-15 Thread Kevin Kwan
Well, here's the thing - I am not even sure if it tried to load the
hibernated image, or it failed in the middle, or it crashed after the
load.
When I powered it up after an s2d it went through the Acer logo, the boot
prompt, the usual device laundry list shows up, the Intel graphics driver
redrew the console, the USB configurations show up, one more line of text
shows up for about 2 seconds, and then it was back to the Acer logo once
again.

I had to do the same thing multiple times just to catch the line at the
very end:
unhibernating @ block 12872447 length 31971840 bytes

I made an annotated video of the entire experience here:

https://www.youtube.com/watch?v=-GTWnES_134



On Sat, Mar 14, 2015 at 6:56 PM, Mike Larkin mlar...@azathoth.net wrote:

 On Sat, Mar 14, 2015 at 02:02:09PM -0400, Kevin Kwan wrote:
  Nope, hibernate/suspend to disk also causes a reset.  Is there anything
  else I should try?

 Hibernate resume will perform what looks like a full boot. Did you let it
 go through that or did you power off when you saw it booting again?

 Or did it load the hibernated image and *then* reboot?

 -ml

  On Mar 14, 2015 1:22 PM, Theo de Raadt dera...@cvs.openbsd.org
 wrote:
 
My daily driver notebook is an Acer Aspire 1410 notebook.  Penryn-ULV
Celeron, Intel GS45 chipset, Intel Centrino 6205 (iwn) swapping a
non-supported Atheros AR2425, 6GB of RAM, normal everyday HDD.
   Everything
seems to work in OpenBSD 5.6 except for the fact that every time I
 put it
on suspend (zzz), it suspends properly (LED indicators in the front
 goes
from blue to blinking orange), but when I take it out of suspend it
 goes
into instant amnesia, takes me back to the Acer boot logo,
  
   You mean the machine resets.
  
Okay, what should be my next steps here?  I see from precursory
 Google
searches that the Linux guys had this problem back in the old Kernel
 3.3
days, and their workaround involves passing grub the i8042.reset
   parameter,
which seems to tell the on-board keyboard controller to clean up its
 own
mess.  Any similar directives I can use here?
  
   Highly unlikely.
  
   Thanks for including all the information in the report.  Result is a
   few people can glance over it and look for hints (as I am about to
   do).  Unfortunately the few rare suspend/resume issues we see are
   pretty hard to diagnose without access to failing machines.
  
   One thing is missing from your report.  Does hibernate work?



Re: OpenBSD as base OS for Virtualization

2015-03-15 Thread Stuart Henderson
On 2015-03-15, Ruslanas Gžibovskis rusla...@lpic.lt wrote:
 Is it something similar to solaris LDoms? On SPARC HW? Just interested.

Yes. it is exactly LDoms, this has been supported for a while now.

http://undeadly.org/cgi?action=articlesid=20121214153413
http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man8/sparc64/ldomctl.8?query=ldomctlarch=sparc64

 What FS supported by OpenBSD? UFS? ZFS?

UFS/UFS2. The ZFS license/patent situation makes it a non-starter for
inclusion in OpenBSD.

 And in conclusion: chroot and qemu for virtualization on OpenBSD?
 sounds really poor... :(

chroot isn't really anything to do with virtualization.

QEMU on OpenBSD is emulation rather than what would normally be called
virtualization, it's very useful for testing but too slow really for
production use.

So, for now, your current options are sun4v ldoms with ldomctl, or use
another OS as host (but OpenBSD is quite well-suited as a guest).



Re: Diffs for OpenBSD /src

2015-03-15 Thread Raf Czlonka
On Sat, Mar 14, 2015 at 07:44:38PM GMT, Alexander Hall wrote:

 cvs diff -uNp,  even. :-) 

On an OpenBSD system, '/etc/skel' contains '.cvsrc', which itself
contains the line:

diff -uNp

So if one has created a local account the standard way using the
defaults, then '.cvsrc' will end up in your $HOME, which in turn will
make specifying the above options redundant.

Raf



Re: Installation panic on boot

2015-03-15 Thread The Aviator
Yes, Linux. Any in particular I should post?

On 3/15/15, Stuart Henderson s...@spacehopper.org wrote:
 On 2015-03-15, The Aviator aviator45...@gmail.com wrote:
 I don't get to a terminal, but the dmesg is at the relevant lines I can
 think of
 (copied by human):

 ioapic0 at mainbus0: apid 2 pa 0xfec0, version 21, 24 pins
 ioapic0: misconfigured as apic 0, remapped to apid 2
 LoadTable
 panic: aml_die aml_parse:3992

 Details:
 This happens using both the mini installation media or the full
 installation media,
 version 5.6 for amd64 copied from ftp.openbsd.org
 The hardware is an AMD, 64 bit Thinkpad Edge E545.
 I am booting from a flash drive (if that means anything).
 The current hard drive in the system is totally blank.
 Same error on mini install media from the 57 snapshot, with an altered
 line
 number
 (3986 instead of 3992).

 Thank you.



 Are you able to run another operating system on the machine and get
 acpidump output files?



Re: I found a sort bug! - How to sort big files?

2015-03-15 Thread Kenneth Gober
I don't know why sort is giving you such problems.  there may be something
unusual about your specific input that it wasn't designed to handle (or it
might simply be a latent bug that has never been identified and fixed).

when I need to sort large files, I split(1) them into smaller pieces, then
sort(1) the pieces individually, then use sort(1) (with the -m option) to
merge the sorted pieces into a single large result file.  this has always
worked reliably for me (and because I was raised using 8-bit and 16-bit
computers I don't have any special expectations that programs should just
work when given very large inputs).

even if you think doing all this is too much bother, try doing it just
once.  you might be able to identify a specific chunk of your input that's
causing the problem, which will help move us all towards a proper solution
(or at least a caveat in the man page).

-ken

On Sun, Mar 15, 2015 at 9:53 AM, sort problem sortprob...@safe-mail.net
wrote:

 Whoops. At least I thought it helped. The default sort with the -H
 worked for 132 minutes then said: no space left in /home (that had before
 the sort command: 111 GBytes FREE). And btw, df command said for free
 space: -18 GByte, 104%.. what? Some kind of reserved space for root?


 Why does it takes more then 111 GBytes to sort -u ~600 MByte sized
 files? This in nonsense.


 So the default sort command is a  big pile of shit when it comes to
 files bigger then 60 MByte? .. lol

 I can send the ~600 MByte txt files compressed if needed...

 I was suprised... sort is a very old command..


  Original Message 
 From: sort problem sortprob...@safe-mail.net
 To: andreas.zeilme...@mailbox.org
 Cc: misc@openbsd.org
 Subject: Re: I found a sort bug! - How to sort big files?
 Date: Sat, 14 Mar 2015 08:39:55 -0400

 o.m.g. It works.

 Why doesn't sort uses this by default on files larger then 60 MByte?

 Thanks!

  Original Message 
 From: Andreas Zeilmeier andreas.zeilme...@mailbox.org
 Apparently from: owner-misc+m147...@openbsd.org
 To: misc@openbsd.org
 Subject: Re: I found a sort bug! - How to sort big files?
 Date: Sat, 14 Mar 2015 13:16:05 +0100

  On 03/14/15 12:49, sort problem wrote:
   Hello,
  
   --
   # uname -a
   OpenBSD notebook.lan 5.6 GENERIC.MP#333 amd64
   #
   # du -sh small/
   663Msmall/
   # ls -lah small/*.txt | wc -l
 43
   #
   # cd small
   # ulimit -n
   1000
   # sysctl | grep -i maxfiles
   kern.maxfiles=10
   #
   # grep open /etc/login.conf
   :openfiles-cur=10:\
   :openfiles-cur=128:\
   :openfiles-cur=512:\
   #
   # sort -u *.txt -o out
   Segmentation fault (core dumped)
   #
   --
  
   This is after a minute run.. The txt files have UTF-8 chars too. A
 line is maximum a few ten chars long in the txt files. All the txt files
 have UNIX eol's. There is enough storage, enough RAM, enough CPU. I'm even
 trying this with root user. The txt files are about ~60 000 000 lines.. not
 a big number... a reboot didn't help.
  
  
  
   Any ideas how can I use the sort command to actually sort? Please
 help!
  
  
  
   Thanks,
  
   btw, this happens on other UNIX OS too, lol... why do we have the sort
 command if it doesn't work?
  
 
  Hi,
 
  have you tried the option '-H'?
  The manpage suggested this for files  60MB.
 
 
  Regards,
 
  Andi



Daemons can't have hyphen (-) sign in the name

2015-03-15 Thread Igor Konforti
I was writing Deamon by name /etc/rc.d/example-client and all a time I
was getting error that ${daemon_user} is client

After looking at source code of rc.subr
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/etc/rc.d/rc.subr?rev=1.92content-type=text/x-cvsweb-markup
I
saw the following:


```
 _name=$(basename $0)
eval _rcuser=\${${_name}_user}
[ -n ${_rcuser} ]  daemon_user=${_rcuser}
```

So, if we have  a deamon by name example-client because of eval there
will be always $daemon_user:

```
-bash-4.2# eval _rcuser=\${example-client_user}
-bash-4.2# echo $_rcuser
client_user
```


I'm not sure if this is bug or the feature, therefore I'm posting this in
misc but if you guys confirm it is a bug I'll send it to bugs@
This of course can be really fixed really easy.

Regards



Re: OpenBSD as base OS for Virtualization

2015-03-15 Thread Mikael
If someone wanted to hack together a Bhyve OBSD port would be complete
awesomeness.

Even as a custom patch only for the stupid guys like me who love this
unsafe virtualization stuff that so many use now. It would be awesome.

I know the whole virtualization thing is crap from a strict security point
of view but I like to take the risk, and OBSD certainly is a better
codebase to do this host stuff in than other systems. Probably some people
would be happy to donate some bucks to the person who wanted to implement
and maintain it.



Re: I found a sort bug! - How to sort big files?

2015-03-15 Thread Steve Litt
On Sun, 15 Mar 2015 09:53:34 -0400
sort problem sortprob...@safe-mail.net wrote:

 Whoops. At least I thought it helped. The default sort with the -H
 worked for 132 minutes then said: no space left in /home (that had
 before the sort command: 111 GBytes FREE). 

That's not surprising. -H implements a merge sort, meaning it's split
into lots and lots of files, each of which is again split into lots of
files, etc. It wouldn't surprise me to see a 60Mline file consume a
huge multiple of itself during a merge sort.

And of course, the algorithm might be swapping.

 And btw, df command said
 for free space: -18 GByte, 104%.. what? Some kind of reserved space
 for root?
 
 
 Why does it takes more then 111 GBytes to sort -u ~600 MByte sized
 files? This in nonsense. 
 
 
 So the default sort command is a  big pile of shit when it comes to
 files bigger then 60 MByte? .. lol

That doesn't surprise me. You originally said you have 60 million
lines. Sorting 60 million items is a difficult task for any algorithm.
You don't say how long each line is, or what they contain, or whether
they're all the same line length.

How would *you* sort so many items, and sort them in a fast yet generic
way? I mean, if RAM and disk space are at a premium, you could always
use a bubble sort, and in-place sort your array in a year or two.

If I were in your shoes, I'd write my own sort routine for the task.
Perhaps using qsort() (see
http://calmerthanyouare.org/2013/05/31/qsort-shootout.html). If there's
a way you can convert line contents into a number reflecting
alpha-order, you could even qsort() in RAM if you have quite a bit of
RAM, and then the last step is to run through the sorted list of
numbers and line numbers, and write the original file by line number.
There are probably a thousand other ways to do it.

But IMHO, sorting 60megalines isn't something I would expect a generic
sort command to easily and timely do out of the box.

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance



Re: OpenBSD as base OS for Virtualization

2015-03-15 Thread bofh
On Sun, Mar 15, 2015 at 1:20 PM, Mikael mikael.tr...@gmail.com wrote:

 I know the whole virtualization thing is crap from a strict security point
 of view but I like to take the risk, and OBSD certainly is a better
 codebase to do this host stuff in than other systems. Probably some people
 would be happy to donate some bucks to the person who wanted to implement
 and maintain it.


Do you hear what you sound like?  If only someone would do what I want for
me, that'd be great.  Yeah, if someone else were to give money to make that
happen, even better!  Oh, it's not secure, and therefore is against
OpenBSD's principles?  Yeah, but me me me.


-- 
http://www.glumbert.com/media/shift
http://www.youtube.com/watch?v=tGvHNNOLnCk
This officer's men seem to follow him merely out of idle curiosity.  --
Sandhurst officer cadet evaluation.
Securing an environment of Windows platforms from abuse - external or
internal - is akin to trying to install sprinklers in a fireworks factory
where smoking on the job is permitted.  -- Gene Spafford
learn french:  http://www.youtube.com/watch?v=30v_g83VHK4



Re: dump and duid

2015-03-15 Thread Philip Guenther
On Fri, Feb 27, 2015 at 5:09 AM, Jan Stary h...@stare.cz wrote:
 This is current/amd64.

 After cleaning my machine I reconnected two of my disks in reverse;
 what was sd0 is sd1 now, and vice versa.

 I do nightly dumps of the filesystems,
 starting with level 0 on early Monday morning,
 continuing with incremental 1, 2 etc through the week.
 Usually this means that the Monday dump -0 is big,
 and the subsequent incrementals are relatively small:
...
 Now, on the night after I interchanged the disks,
 the dump -4 of sd1a (/biblio) is huge again; apparently,
 dump -4 is dumping everything again.

 Is this simply because /etc/dumpdates deals
 with device names, as opposed to duids?

It sounds like you should start using the -U option on dump starting
with your next level zero for each disk.

I wonder if it could be made the default by first searching for an
entry with DUID and lower dump level, and falling back to a device
name entry if no matching DUID entry was found or if they were just
for higher dump levels. Once you do a level zero for a DUID it'll
never look for a device entry again, but during the transition I think
that strategy would find the same device entries that it would
otherwise have found.


Philip Guenther



Re: Installation panic on boot

2015-03-15 Thread The Aviator
Information was posted here: http://sprunge.us/aUCO

This is the entirety of acpidump piped to this pastebin.

On Sun, Mar 15, 2015 at 5:29 PM, The Aviator aviator45...@gmail.com wrote:

 Yes, Linux. Any in particular I should post?

 On 3/15/15, Stuart Henderson s...@spacehopper.org wrote:
  On 2015-03-15, The Aviator aviator45...@gmail.com wrote:
  I don't get to a terminal, but the dmesg is at the relevant lines I can
  think of
  (copied by human):
 
  ioapic0 at mainbus0: apid 2 pa 0xfec0, version 21, 24 pins
  ioapic0: misconfigured as apic 0, remapped to apid 2
  LoadTable
  panic: aml_die aml_parse:3992
 
  Details:
  This happens using both the mini installation media or the full
  installation media,
  version 5.6 for amd64 copied from ftp.openbsd.org
  The hardware is an AMD, 64 bit Thinkpad Edge E545.
  I am booting from a flash drive (if that means anything).
  The current hard drive in the system is totally blank.
  Same error on mini install media from the 57 snapshot, with an altered
  line
  number
  (3986 instead of 3992).
 
  Thank you.
 
 
 
  Are you able to run another operating system on the machine and get
  acpidump output files?



Re: Daemons can't have hyphen (-) sign in the name

2015-03-15 Thread Antoine Jacoutot
On Sun, Mar 15, 2015 at 07:08:52PM +0200, Igor Konforti wrote:
 I was writing Deamon by name /etc/rc.d/example-client and all a time I
 was getting error that ${daemon_user} is client
 
 After looking at source code of rc.subr
 http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/etc/rc.d/rc.subr?rev=1.92content-type=text/x-cvsweb-markup
 I
 saw the following:
 
 
 ```
  _name=$(basename $0)
 eval _rcuser=\${${_name}_user}
 [ -n ${_rcuser} ]  daemon_user=${_rcuser}
 ```
 
 So, if we have  a deamon by name example-client because of eval there
 will be always $daemon_user:
 
 ```
 -bash-4.2# eval _rcuser=\${example-client_user}
 -bash-4.2# echo $_rcuser
 client_user
 ```
 
 
 I'm not sure if this is bug or the feature, therefore I'm posting this in
 misc but if you guys confirm it is a bug I'll send it to bugs@
 This of course can be really fixed really easy.

man rc.subr:

...
DESCRIPTION
 Apart from a few notable exceptions, rc scripts must follow this naming
 policy:

 1.   Use the same name as the daemon it is referring to.
 2.   Dashes (‘-’) have to be converted to underscores (‘_’).

-- 
Antoine



Re: Fwd: Re: I found a sort bug! - How to sort big files?

2015-03-15 Thread Ted Unangst
sort problem wrote:
 So the default sort command is a  big pile of shit when it comes to files 
 bigger then 60 MByte? .. lol
 
 I can send the ~600 MByte txt files compressed if needed...
 
 I was suprised... sort is a very old command..

I think you have discovered the answer. :(



Re: running multiple simultaneous X sessions as different users

2015-03-15 Thread Ted Unangst
luke...@onemodel.org wrote:
 I'm new to desktop OpenBSD (longtime debian user) and have read in
 FAQs, all relevant man pages I could find, and searched the internet
 and mailing list archives, and am not sure what I'm doing wrong or have
 missed.
 
 The goal:  I'd like to run multiple simultaneous X sessions and switch
 among them with Ctrl-Alt-F8, Ctrl-Alt-F9, etc, each one as a different
 user (separation of privileges, like general browsing vs. admin 
 programming, vs. banking, etc, so that if one is compromised by a
 browser flaw etc, the other user accounts are unaffected.

I would probably start with Xnest here.



Re: Installation panic on boot

2015-03-15 Thread Stuart Henderson
On 2015/03/15 20:39, The Aviator wrote:
 Information was posted here: http://sprunge.us/aUCO
 
 This is the entirety of acpidump piped to this pastebin.

That should have the relevant information - note to readers,
acpixtract (in acpica) will unwrap that into normal aml files.



Re: Installation panic on boot

2015-03-15 Thread The Aviator
I have now tested with UEFI, UEFI+Legacy boot (where either one was given
priority), and Legacy-Only boot.

On Sun, Mar 15, 2015 at 3:39 PM, The Aviator aviator45...@gmail.com wrote:

 Information was posted here: http://sprunge.us/aUCO

 This is the entirety of acpidump piped to this pastebin.

 On Sun, Mar 15, 2015 at 5:29 PM, The Aviator aviator45...@gmail.com
 wrote:

 Yes, Linux. Any in particular I should post?

 On 3/15/15, Stuart Henderson s...@spacehopper.org wrote:
  On 2015-03-15, The Aviator aviator45...@gmail.com wrote:
  I don't get to a terminal, but the dmesg is at the relevant lines I can
  think of
  (copied by human):
 
  ioapic0 at mainbus0: apid 2 pa 0xfec0, version 21, 24 pins
  ioapic0: misconfigured as apic 0, remapped to apid 2
  LoadTable
  panic: aml_die aml_parse:3992
 
  Details:
  This happens using both the mini installation media or the full
  installation media,
  version 5.6 for amd64 copied from ftp.openbsd.org
  The hardware is an AMD, 64 bit Thinkpad Edge E545.
  I am booting from a flash drive (if that means anything).
  The current hard drive in the system is totally blank.
  Same error on mini install media from the 57 snapshot, with an altered
  line
  number
  (3986 instead of 3992).
 
  Thank you.
 
 
 
  Are you able to run another operating system on the machine and get
  acpidump output files?