# Intel Atom - RIP?



## Speedy (Jul 5, 2021)

I have this old Atom, working as my router. Running FreeBSD since ... shortly after fall of Roman Empire. Sometimes when running `portupgrade` it starts telling me my OS is no longer supported, then I get the sources and do `make buildworld`, plus all the jazz what comes with it.
Now it fails. I attempted to build 13.0-RELEASE. Building with -j1 it compiled for two days, then segfaulted - when building magic for file utility. Ouch, I thought. Lets build 12-STABLE then. Same thing, same place, segfault.
I'm ready to toss this Atom when 12.2 is no longer supported, 12.2 was my last successful build. But I'm a little curious, may it be something is screwed up in my current install causing this segfault? Or buildworld does not use anything from host system, it bootstraps itself and then uses tools it just freshly built?


----------



## ralphbsz (Jul 5, 2021)

Most older Intel Atoms are 32-bit platforms (using the i386 instruction set), and they have been moved to tier 2 support beginning in version 13. But that does not mean unsupported, everything should continue to work as usual, except that maintainers will prioritize bugs coming from this platform lower. It definitely does not mean that you have to build everything from source, and even less so that the build should fail.

You can see the change in support tiers by looking at https://www.freebsd.org/platforms/


----------



## SirDice (Jul 5, 2021)

There's nothing that would make an Intel Atom not supported anymore. I see no reason why that would be the case. I'm more inclined to blame some faulty hardware, like dodgy memory or disks.


----------



## Speedy (Jul 5, 2021)

Thanks for replies. It is 64 bit. I've ruled out hardware fault, now it has been three times when it segfaults in exactly same place and same command, with different set of sources. Heck, every time it takes two days to get there. I hope there is no law against torturing old computers ...
Here is the tail of it, captured from a screen session I still had running.

```
r/src/contrib/file/magic/Magdir/vorbis /usr/src/contrib/file/magic/Magdir/vxl /usr/src/contrib/file/magic/Magdir/warc /usr/src/contrib/file/magic/Magdir/weak /usr/src/contrib/file/magic/Magdir/web /usr/src/contrib/file/magic/Magdir/webassembly /usr/src/contrib/file/magic/Magdir/windows /usr/src/contrib/file/magic/Magdir/wireless /usr/src/contrib/file/magic/Magdir/wordprocessors /usr/src/contrib/file/magic/Magdir/wsdl /usr/src/contrib/file/magic/Magdir/x68000 /usr/src/contrib/file/magic/Magdir/xdelta /usr/src/contrib/file/magic/Magdir/xenix /usr/src/contrib/file/magic/Magdir/xilinx /usr/src/contrib/file/magic/Magdir/xo65 /usr/src/contrib/file/magic/Magdir/xwindows /usr/src/contrib/file/magic/Magdir/yara /usr/src/contrib/file/magic/Magdir/zfs /usr/src/contrib/file/magic/Magdir/zilog /usr/src/contrib/file/magic/Magdir/zip /usr/src/contrib/file/magic/Magdir/zyxel > magic
./mkmagic magic
*** Signal 11
Stop.
make[5]: stopped in /usr/src/lib/libmagic
*** Error code 1
*** Error code 1
*** Error code 1
*** Error code 1
*** Error code 1
```


----------



## SirDice (Jul 5, 2021)

Speedy said:


> now it has been three times when it segfaults in exactly same place and same command, with different set of sources.


Ok, that's odd.



> Heck, every time it takes two days to get there.


Could the system be running out of memory? You can get some weird errors with that too. 



Speedy said:


> I hope there is no law against torturing old computers ...


If that were the case I would have been imprisoned years ago


----------



## Jose (Jul 5, 2021)

Have you tried running just `./mkmagic magic` again after the crash?


----------



## Speedy (Jul 5, 2021)

It has 4 GB, and it has swap 4 GB. I shut down Unifi when building, rest of daemons do not require much resources. I've kept an eye on it, every time I look there is at least 500 MB free and more than 2 GB inactive. No sign of OOM killer in action anywhere in the logs.
I'm in process building a "new" router based on an old Dell with 8 GB and Intel E8400. Then I may try and do a fresh install. This install currently there is very old, probably started with 8 or even 7, maybe some "leftovers" are the culprit.
Jose,
unfortunately `make cleanworld` was run just a minute ago ...


----------



## obsigna (Jul 5, 2021)

My home server is running 24/7 since 2009 - here an excerpt from `dmesg`:

```
...
FreeBSD 13.0-RELEASE-p3 #0: Tue Jun 29 19:46:20 UTC 2021
    root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)
VT(vga): resolution 640x480
CPU: Intel(R) Atom(TM) CPU D510   @ 1.66GHz (1666.72-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x106ca  Family=0x6  Model=0x1c  Stepping=10
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x40e31d<SSE3,DTES64,MON,DS_CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE>
  AMD Features=0x20100800<SYSCALL,NX,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant, performance statistics
real memory  = 2147483648 (2048 MB)
avail memory = 2029629440 (1935 MB)
...
```

Over all the years it has been upgraded all the way up from FreeBSD 8 to now 13 by the way of freebsd-update(8).


----------



## Speedy (Jul 5, 2021)

D2500 here. I'm using CPUTYPE?=native, perhaps there is some regression which is affecting just me. I don't think there are too many users building from sources on an Atom.


----------



## SirDice (Jul 5, 2021)

```
CPU: Intel(R) Atom(TM) CPU D2700   @ 2.13GHz (2128.05-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x30661  Family=0x6  Model=0x36  Stepping=1
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x40e31d<SSE3,DTES64,MON,DS_CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE>
  AMD Features=0x20100800<SYSCALL,NX,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant, performance statistics
```
Don't know how old your Atom is but this one is running 13.0-RELEASE just fine. 



Speedy said:


> I don't think there are too many users building from sources on an Atom.


I had 12-STABLE on this system before, building world just took up way to much time (system also has a really slow 2.5" HD), when 13.0-RELEASE came out I took the opportunity to reinstall with a -RELEASE so I didn't have to buildworld on it any more.


----------



## diizzy (Jul 5, 2021)

Just get a RockPro64 or whatever and replace your 10y+ old Atom setup, done?


----------



## Speedy (Jul 5, 2021)

RockPro64 is interesting but not as easy solution as it seems. Need a box for it, some cooling, space for hard drive, and need to figure out how to add a second ethernet port to it. OTOH, I have a Dell Optiplex 780 right here, with three gigabit ports, all Intel NICs. Looks like a winner to me.


----------



## sko (Jul 6, 2021)

~2 Years ago I've replaced a 1U Celeron server from ~2000 with an UBNT EdgeRouter 4 running OpenBSD (IIRC FreeBSD is said to also work on these). This thing has 4xGBit (one SFP), is passively cooled and runs <10W under normal load...


----------



## Speedy (Jul 6, 2021)

Can you attach some storage to it? And run mail and web server?


----------



## sko (Jul 6, 2021)

The requirement per the first post was a "router" - neither file-, mail- nor webservers[*] belong on a router/gateway! But yes, you could as well run a webserver on it, although I'd only serve some static content or only run a reverse proxy to not wear out the USB flash disk in a short time.
The single USB-port is also the major restriction when it comes to storage. You could try to attach a large-ish SSD via USB for OS + storage, but booting from such adapters is usually a hit-or-miss (mostly 'miss').
Mailservers never belong on residential internet connections with changing IPs and questionable reliability. Those IP ranges/AS are usually blocked by a lot of mail providers, so your mails won't reach most of its recipients anyways...

The EdgeRouter is a cheap, highly biased/specialized networking appliance, not a general-purpose server - so don't expect it to run workloads that belong on a general-purpose server.



* with the possible exception of some web-based GUI if you really need that...


----------



## Speedy (Jul 6, 2021)

Ha! I never said it is router and router only. And what's this "mailserver not possible" talk? Mailserver can be also for LAN use, sometimes receiving mail from outside is important and sending is not, outgoing mail can be relayed thru ISP mail server, etc.  I have people sending mail locally to each other, and ability to create temporary email addresses is a blessing when buying stuff over internet, some sellers just do not honor their customers privacy and start spamming. All my LAN computers send their maintenance and alert emails to this server negating need to monitor them separately, and so on. In addition it is used to duplicate some backups, just to illustrate how much more than a plain router it is. At some point it also ran smarthome software.
Don't get me wrong, thanks for introducing this interesting unit.  Just don't try and apply your personal requirements and preferences to other people.


----------



## gotnull (Jul 6, 2021)

SirDice said:


> There's nothing that would make an Intel Atom not supported anymore. I see no reason why that would be the case. I'm more inclined to blame some faulty hardware, like dodgy memory or disks.


+1 
You should check your memory sticks then your disk.


----------



## Jose (Jul 6, 2021)

Mjollnir makes fun of me because I use two servers for the purposes Speedy lists. Tunneling the mail connections from a public virtual server with a real IP is fairly straightforward. Home server storage plus Tarsnap means I'm immune to the siren call of "the cloud".

One advantage of the router (which is just a commodity PC running Openbsd) plus server (again commodity server, but with a lot of disk) setup is that I have two DHCP servers and two DNS servers. Users on my home network have no disruption in Internet service when I have to do maintenance on either one.


----------



## diizzy (Jul 6, 2021)

Speedy said:


> RockPro64 is interesting but not as easy solution as it seems. Need a box for it, some cooling, space for hard drive, and need to figure out how to add a second ethernet port to it. OTOH, I have a Dell Optiplex 780 right here, with three gigabit ports, all Intel NICs. Looks like a winner to me.


RockPro64 runs passively just fine, although since it doesn't have native SATA you're limited to using the PCIe slot unless you want to rely on USB(3). https://wiki.freebsd.org/arm/RockChip#Tested_PCIe_devices_on_RockPro64 (just a small collection)


----------



## Terry_Kennedy (Jul 7, 2021)

Speedy said:


> Here is the tail of it, captured from a screen session I still had running.
> 
> ```
> r/src/contrib/file/magic/Magdir/vorbis /usr/src/contrib/file/magic/Magdir/vxl /usr/src/contrib/file/magic/Magdir/warc /usr/src/contrib/file/magic/Magdir/weak /usr/src/contrib/file/magic/Magdir/web /usr/src/contrib/file/magic/Magdir/webassembly /usr/src/contrib/file/magic/Magdir/windows /usr/src/contrib/file/magic/Magdir/wireless /usr/src/contrib/file/magic/Magdir/wordprocessors /usr/src/contrib/file/magic/Magdir/wsdl /usr/src/contrib/file/magic/Magdir/x68000 /usr/src/contrib/file/magic/Magdir/xdelta /usr/src/contrib/file/magic/Magdir/xenix /usr/src/contrib/file/magic/Magdir/xilinx /usr/src/contrib/file/magic/Magdir/xo65 /usr/src/contrib/file/magic/Magdir/xwindows /usr/src/contrib/file/magic/Magdir/yara /usr/src/contrib/file/magic/Magdir/zfs /usr/src/contrib/file/magic/Magdir/zilog /usr/src/contrib/file/magic/Magdir/zip /usr/src/contrib/file/magic/Magdir/zyxel > magic
> ...


Try going back a bit further. It looks like your first line is part of a longer line that wrapped. buildworld failures can cascade from a bit further back. You can always capture the entire build log with script(1).

A few hints:

Start with a clean (empty) /usr/obj.
Don't try to cross-build a different major release unless you can build -STABLE on your current release.
Don't use multiple jobs (-j option) when trying to track down a build failure.
Use an empty /etc/make.conf (likewise for /etc/src.conf if you created / modified it). In particular, CPUTYPE is _NOT_ your friend.
Try running the build on a faster system if available.


----------

