Jails and stability?

Status
Not open for further replies.

rungekutta

Contributor
Joined
May 11, 2016
Messages
146
So, I've had over 36 hours of stable use since I swapped to DHCP (I deleted all the jails and deleted the dataset before I made the config change). I think I can (somewhat) confidently say that it was using static IPs (well, FreeNAS internally assigned IPs) that was causing the crashes.

rungekutta, it would be great if you are in a position to verify those results. If it gives you a stable environment, I'll raise a FreeNAS bug (which may actually be a FreeBSD thing, but I'm not the best person to decide that).
I tried it out today. Blew away all my jails and created a fresh one, with DHCP (ip4). Updated packages and installed Plex as per this tutorial: https://forums.freenas.org/index.ph...all-plex-in-a-freenas-9-3-jail-updated.19412/

Did nothing else. And while I did not experience any reboots, the jail still messes with my CIFS service. When the jail is running, Macs cannot connect. As soon as I stop the jail, the share pops back up in Finder and all Mac clients can connect as normal and as before.

So unclear if DHCP made any difference for me - at least some of the issues are still there.
 

Mr Snow

Dabbler
Joined
May 22, 2016
Messages
29
I can't help there sorry. I don't run any Macs at home. I'm connecting fine via CIFS shares to my linux laptop though.

There are definitely still issues. I created one plugin (couchpotato) not long after my last post. I changed my mind and decided to make it a standard jail instead and deleted the plugin and created a jail. I ended up with a MAC address conflict and saw another kernel panic. I deleted the new jail and I've been stable since. Not too keen on playing with jails anymore at the moment. I don't want to mess with what is working :)

Regards,

CJ
 

maglin

Patron
Joined
Jun 20, 2015
Messages
299
Mr. Snow you can just change the MAC address of the Jail. Make sure you leave ViImage checked so it uses a virtual network interface. I just change the last character or so to something else. Since it's all inside your own network you don't have to worry about issues as it will be the MAC address of your router that the outside internet sees. Only thing you have to worry about is that you don't have two of the same MAC addresses in your own network.

There is not reason to be scared of jails. Tackle the solution to the problem.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Whilst I can't offer much in terms of what the problems might be, I've currently got 13 jails running (all with static IPs) and have no problems connecting to FreeNAS from any of my Macs, although they are all using AFP shares.
 

rungekutta

Contributor
Joined
May 11, 2016
Messages
146
Thanks @AdrianWilliamson. In this new build I'm using CIFS as Apple are now themselves officially migrating away from AFP. Perhaps I can work around the issue by switching from CIFS to AFP; however the Jails clearly shouldn't mess with system services in the 1st place, implies something very strange is going on and I'd be worried about other ill effects too. If there's a hardware issue I'm yet to find a way to diagnose it - frankly I am more leaning towards some weird bug seen with my combination of motherboard (and NIC) and CPU. There's a link to a bug report further up this thread - and some threads discussing similar issues - but nothing too conclusive. I will steer clear of Jails for now.
 

rungekutta

Contributor
Joined
May 11, 2016
Messages
146
PS when sifting through crash logs I saw a kernel message warning about VIMAGE being "highly experimental". So perhaps it should be assumed that it works better in some configurations than others.
 

Mr Snow

Dabbler
Joined
May 22, 2016
Messages
29
Mr. Snow you can just change the MAC address of the Jail. Make sure you leave ViImage checked so it uses a virtual network interface. I just change the last character or so to something else. Since it's all inside your own network you don't have to worry about issues as it will be the MAC address of your router that the outside internet sees. Only thing you have to worry about is that you don't have two of the same MAC addresses in your own network.

There is not reason to be scared of jails. Tackle the solution to the problem.

I should be clear about exactly what I did which I suspect caused the reboot. I installed the couchpotato plugin, then decided that I wanted to use a standard jail instead. So I deleted the plugin and immediately installed the jail. I noticed that the jail had the same MAC as the now deleted plugin. I setup the DHCP reservation I wanted on my router, then restarted the jail. About 30 minutes after that the server crashed.

The only thing I can consistently point to is stopping and starting jails causes the following on the console, after which the crash can occur (not always):

Code:
<7>ifa_del_loopback_route: deletion failed: 48
Freed UMA keg (udp_inpcb) was not empty (240 items).  Lost 24 pages of memory.
Freed UMA keg (udpcb) was not empty (2171 items).  Lost 13 pages of memory.
Freed UMA keg (tcptw) was not empty (1035 items).  Lost 23 pages of memory.
Freed UMA keg (tcp_inpcb) was not empty (349 items).  Lost 35 pages of memory.
Freed UMA keg (sackhole) was not empty (375 items).  Lost 3 pages of memory.
Freed UMA keg (tcpcb) was not empty (89 items).  Lost 30 pages of memory.
hhook_vnet_uninit: hhook_head type=1, id=1 cleanup required
hhook_vnet_uninit: hhook_head type=1, id=0 cleanup required

Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x378
fault code     = supervisor read data, page not present
instruction pointer   = 0x20:0xffffffff8098e0fd
stack pointer    = 0x28:0xfffffe08317c5720
frame pointer    = 0x28:0xfffffe08317c57b0
code segment     = base 0x0, limit 0xfffff, type 0x1b
       = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags   = interrupt enabled, resume, IOPL = 0
current process     = 12 (swi4: clock)


Starting/stopping/restarting always causes the "Freed UMA keg" alerts...

Regards,

CJ
 

snicke

Explorer
Joined
May 5, 2015
Messages
74
Thanks for the info @Mr Snow regarding jails in FreeNAS 10. I had missed that.

Regarding stability issues in jails I got networking issues when I added my third jail today. When I interacted with one jail the other freezed from a networking point of view. Look into my routers admin interface and there I could only see two of the three static IP addresses I had assigned to my three jails. It seemed like two of the jails got the same IP address.

I started to troubleshoot and it turned out that two of my jails got exactly the same MAC address in the jail configuration by default. Just changed a number in one of the jail's settings for the MAC address and the problems went away and my router showed three static IP addresses for the three jails again. Everything responsive again in and from the jails (while interacting with webservers on them).

Hope this helps someone experiencing similar problems. Make sure that no two jails have the same MAC address in the jails settings in the FreeNAS admin GUI.
 
Status
Not open for further replies.
Top