Looking at nmb.service and smb.service as possible cause desktop/system crash/freeze

Hello,

  • OpenMandriva Lx version:
    Lx 3

  • Desktop environment (KDE, LXQT…):
    Any but mostly KDE/Plasma5

  • Description of the issue (screenshots if relevant):
    I experience occaisonal crashes or freezes. Sometimes the KDE menu panel goes blank and I simply need to logout/login. Other times when I leave computer unattended like overnight and come back I have no display and no access to kbd and mouse so have to restart computer with restart button. (That isn’t good.)

  • Relevant informations (hardware involved, software version, logs or output…):

      $ inxi -F
      System:    Host: ben79-pc Kernel: 4.15.15-desktop-1omv x86_64 (64 bit) Desktop: KDE   Plasma 5.10.5
                 Distro: OpenMandrivaLinux 3.0 Einsteinium
      Machine:   System: ASUS product: All Series
                 Mobo: ASUSTeK model: H97M-E v: Rev X.0x Bios: American Megatrends v: 2702 date: 03/28/2016
      CPU:       Quad core Intel Core i5-4590 (-MCP-) cache: 6144 KB 
                 clock speeds: max: 3700 MHz 1: 3527 MHz 2: 3521 MHz 3: 3539 MHz 4: 3499 MHz
      Graphics:  Card: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller
                 Display Server: OpenMandriva X.org 119.6 drivers: (unloaded: fbdev,vesa)
                 Resolution: 1920x1080@60.00hz
                 GLX Renderer: Mesa DRI Intel Haswell Desktop GLX Version: 3.0 Mesa 17.3.8
      Audio:     Card-1 Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller driver: snd_hda_intel
                 Card-2 Intel 9 Series Family HD Audio Controller driver: snd_hda_intel
                 Sound: Advanced Linux Sound Architecture v: k4.15.15-desktop-1omv
      Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
                 IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: 78:24:af:3c:ea:b3
      Drives:    HDD Total Size: 1500.3GB (10.7% used) ID-1: /dev/sda model: WDC_WD1002FAEX size: 1000.2GB
                 ID-2: /dev/sdb model: Crucial_CT500MX2 size: 500.1GB
      Partition: ID-1: / size: 20G used: 7.8G (42%) fs: ext4 dev: /dev/sdb9
                 ID-2: /home size: 9.8G used: 732M (8%) fs: ext4 dev: /dev/sdb10
                 ID-3: swap-1 size: 5.37GB used: 0.00GB (0%) fs: swap dev: /dev/sdb2
      RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
      Sensors:   System Temperatures: cpu: 50.0C mobo: 27.8C
                 Fan Speeds (in rpm): cpu: 0
      Info:      Processes: 204 Uptime: 3:05 Memory: 1595.0/15917.2MB Client: Shell (bash) inxi: 2.2.27
    

What I most commonly see right before the “computer unattended freeze” in journal is red lines about nmb.service and smb.service. These are related to Samba which I don’t use as there is no Windows partition on this computer.

So I’m going to try disabling these services and see if that helps, but it will take time to find out.

Here I’ll post:

$ systemctl status smb.service
● smb.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smb.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-04-14 15:08:12 CDT; 1min 34s ago
 Main PID: 7104 (smbd)
   Status: "smbd: ready to serve connections..."
    Tasks: 4 (limit: 4915)
   Memory: 7.2M
   CGroup: /system.slice/smb.service
           ├─7104 /usr/sbin/smbd --foreground --no-process-group
           ├─7106 /usr/sbin/smbd --foreground --no-process-group
           ├─7107 /usr/sbin/smbd --foreground --no-process-group
           └─7108 /usr/sbin/smbd --foreground --no-process-group

Apr 14 15:08:12 ben79-pc smbd[7104]:   Unable to open new log file '/usr/local/samba/var/log.smbd': No such file or directory
Apr 14 15:08:12 ben79-pc smbd[7104]: [2018/04/14 15:08:12.645566,  0] ../lib/util/debug.c:1053(reopen_logs_internal)
Apr 14 15:08:12 ben79-pc smbd[7104]:   Unable to open new log file '/usr/local/samba/var/log.smbd': No such file or directory
Apr 14 15:08:12 ben79-pc smbd[7104]: [2018/04/14 15:08:12.645593,  0] ../lib/util/debug.c:1053(reopen_logs_internal)
Apr 14 15:08:12 ben79-pc smbd[7104]:   Unable to open new log file '/usr/local/samba/var/log.smbd': No such file or directory
Apr 14 15:08:12 ben79-pc smbd[7104]: [2018/04/14 15:08:12.652275,  0] ../lib/util/become_daemon.c:124(daemon_ready)
Apr 14 15:08:12 ben79-pc smbd[7104]:   STATUS=daemon 'smbd' finished starting up and ready to serve connections
Apr 14 15:08:12 ben79-pc systemd[1]: Started Samba SMB Daemon.
Apr 14 15:08:12 ben79-pc smbd[7108]: [2018/04/14 15:08:12.653440,  0] ../lib/util/debug.c:1053(reopen_logs_internal)
Apr 14 15:08:12 ben79-pc smbd[7108]:   Unable to open new log file '/usr/local/samba/var/log.smbd': No such file or directory

$ systemctl status nmb.service
● nmb.service - Samba NMB Daemon
   Loaded: loaded (/lib/systemd/system/nmb.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-04-14 15:08:22 CDT; 19min ago
 Main PID: 7114 (nmbd)
   Status: "nmbd: ready to serve connections..."
    Tasks: 1 (limit: 4915)
   Memory: 2.7M
   CGroup: /system.slice/nmb.service
           └─7114 /usr/sbin/nmbd --foreground --no-process-group

Apr 14 15:08:24 ben79-pc nmbd[7114]:   standard_fail_register: Failed to register/refresh name BEN79-PC<00> on subnet 192.168.0.101
Apr 14 15:13:37 ben79-pc nmbd[7114]: [2018/04/14 15:13:37.296203,  0] ../source3/nmbd/nmbd_namequery.c:109(query_name_response)
Apr 14 15:13:37 ben79-pc nmbd[7114]:   query_name_response: Multiple (2) responses received for a query on subnet 192.168.0.101 for name MYGROUP<1d>.
Apr 14 15:13:37 ben79-pc nmbd[7114]:   This response was from IP 192.168.0.104, reporting an IP address of 192.168.0.104.
Apr 14 15:18:39 ben79-pc nmbd[7114]: [2018/04/14 15:18:39.618523,  0] ../source3/nmbd/nmbd_namequery.c:109(query_name_response)
Apr 14 15:18:39 ben79-pc nmbd[7114]:   query_name_response: Multiple (2) responses received for a query on subnet 192.168.0.101 for name MYGROUP<1d>.
Apr 14 15:18:39 ben79-pc nmbd[7114]:   This response was from IP 192.168.0.104, reporting an IP address of 192.168.0.104.
Apr 14 15:23:43 ben79-pc nmbd[7114]: [2018/04/14 15:23:43.012725,  0] ../source3/nmbd/nmbd_namequery.c:109(query_name_response)
Apr 14 15:23:43 ben79-pc nmbd[7114]:   query_name_response: Multiple (2) responses received for a query on subnet 192.168.0.101 for name MYGROUP<1d>.
Apr 14 15:23:43 ben79-pc nmbd[7114]:   This response was from IP 192.168.0.104, reporting an IP address of 192.168.0.104.

The posted lines are typical of the continual red lines I get in journal about these 2 services.

To disable them I will become root and:

# systemctl stop nmb.service

# systemctl stop smb.service

# systemctl disable nmb.service
Removed /etc/systemd/system/multi-user.target.wants/nmb.service.

# systemctl disable smb.service
Removed /etc/systemd/system/multi-user.target.wants/smb.service.

Now I reboot and maybe in 3 to 7 days I’ll be able to see some results one way or the other.

Edit: This is speculation on my part at this time whether these have anything to do with the issue but I thought to post in case anyone else with crashes or freezes wants to try this.

If you use Samba then you do not want to disable nmb.service and smb.service.

(Besides if you are using Samba then you probably are using Windows so you should be well used to crashes and freezes.) :smiling_imp:

1 Like

And perhaps there are other unused services being enabled by default in OM Lx 3 that contribute to these crashes/freezes. If anyone has any ideas on this I would like to hear it.

Why does it look for a log file in_/usr/local/_ ?

My first question was why is this stuff enabled by default on OM systems. @Colin says it is because OM has always come with Samba stuff enabled by default. There are developers that think this is not a good idea. How many users actually use Samba? I don’t use it even on computers with Windows.

As far as why “it” is looking in /usr/local I don’t know.

1 Like

Samba is widely used in mixed networks. I guess it is used to share folder between computers. For example Dolphin has the ability to reach shared remote folder without any particular configuration and this may be appreciated by people operating with mixed environment.

As far as I have ever heard it is used to share stuff between a Linux system and a Windows system. It can be used in other ways but I’ve never heard of anyone doing so.

More to the point. What I’m trying to get to is why after all this time do we have users including me that report freezes and crashes in Plama5 desktop. My thought is that in OM we are enabling a lot of unused services in a effort to make a system that works our of the box for most all users.

So in that vein I have started with 2 services that:

  1. They go together, both are from package samba-server
  2. They are not needed or used on my computers
  3. They are what creates the most red lines in journal logs on both of my computers

Edit: And it is ironic that developers are working on Lx4 while we still have problems with freezes/crashes in Lx3.

Edit2: Which leads me to wonder if these will ever be resolved in Lx3…

Update on this. The above seems to have eliminated the shut downs I would get if I leave computer on over night. It has not done anything that I can tell to stop the occasional menu panel crash.

Edit: Or maybe it has helped with menu panel crash.