ndsd cores due to a trap divide error.

  • 7010827
  • 25-Sep-2012
  • 05-Nov-2012

Environment

Novell Open Enterprise Server 11 (OES 11) Linux
Novell Open Enterprise Server 2 (OES 2) Linux
Novell PSH Sync Center 2.25.8
Novell Open Enterprise Server 11 (OES 11) Linux Support Pack 1

Situation

The ndsd of one or more Novell Open Enterprise Servers are coring with a "ndsd trap divide error in libncpengine.so" error:
"kernel: [ ?????.??????] ndsd[?????] trap divide error ip:???????????? sp:???????????? error:0 in libncpengine.so.0.0.0[????????????+103000]"
Where the ?? are hexadecimal strings (seen in /var/log/messages).
For instance:
kernel: [ 4409.726088] ndsd[3373] trap divide error ip:7f333557c53d sp:7f33217e6200 error:0 in libncpengine.so.0.0.0[7f33354f2000+103000]

Sync Center of Novell PSH is configured to run in NCP mode.

Using "ncpmount" to connect to a share residing on an OES11SP1 server and using the "-o nonfs" option to mount the share, as soon as you edit a file on this share, the server hosting the ncpmount volume will core in ndsd.

Resolution

Reconfigure the Sync Center so it uses the TSA mode for OES Linux servers.

This is also stipulated in the documentation (which is part of the download of the Sync Center suite):
"The TSA/SMDR technology (provided by Storage Management Services) is available on both NetWare and OES/Linux servers, allowing Sync Center to transfer files between volumes of these operating systems.

Navigate in iManager to SMS Backup and Restore -> TSAFS Options, and set TSA mode to NetWare or Dual in order to allow Sync Center to use NetWare semantics when connecting to the OES/Linux server. Make sure you have the latest novell-sms package on your server, as earlier versions did not have this option yet.

Note.: On OES/Linux servers, TSA mode allows access to NSS volumes only. Other file system types
(ext3, ReiserFS etc.) are not supported at this time."

The Sync Center documentation also states:
"We strongly suggest using TSA mode whenever it is possible."

The root of the problem has been fixed in the novell-ncpenc RPM (FTF name: novell-ncpenc-5.2.1-26.17.20120927_124020) package scheduled for November 2012 OES Maintenance update.   Please contact Novell Support if you are interested in the Field Test file update for OES11 SP1. 

Cause

In NCP mode, the file transfers are not performed in UTF-8, where the NCP server of OES Linux only uses UTF-8 encoding. The TSA mode of Sync Center uses UTF-8 encoding.

The Sync Center documentation states:
"Previous Sync Center versions offered NCP mode only, which is fine for local networks and several types of high speed remote connections, but may exhibit low performance over WAN links, and cannot deal with UTF-8 file names stored on NSS volumes. Version 2.0 introduced the new TSA mode, which offers optimal bandwidth usage in both situations, and provides several new features like cross-platform and cross-tree operation."

"NCP mode is considered legacy these days, mainly because it does not use UTF-8. This should not represent a problem if both source and target NetWare servers are set to the same local codepage. However, it is possible that some file names cannot be translated from UTF-8 to the server codepage, and Sync Center may not be able to detect this situation, leading to false In Sync status."

Additional Information

When the server is configured to as explained in TID 3078409 "Handeling ndsd (eDirectory) core files on Linux and Solaris" you can double check if this is the issue causing the ndsd to core.
The backtrace (bt) would look like this:
#0  0x00007ffe7a2ae53d in AddNetWareFileInfo(unsigned int, int, unsigned int, int, pseudo_netware_direntry*, unsigned int, int, char*, int*, int, unsigned char*, int, unsigned int, long long, stat*) () from /opt/novell/eDirectory/lib64/nds-modules/libncpengine.so
#1  0x00007ffe7a2aee00 in GetNetWareFileInfo(unsigned int, int, unsigned int, int, pseudo_netware_direntry*, unsigned int, int, char*, int*, int, CacheEntryInfo*, stat*) () from /opt/novell/eDirectory/lib64/nds-modules/libncpengine.so
#2  0x00007ffe7a2916fb in ContinueFileSearch(unsigned int, int, unsigned int, unsigned int, int, int, char*, unsigned int, unsigned int*, char*, int*, int) () from /opt/novell/eDirectory/lib64/nds-modules/libncpengine.so
#3  0x00007ffe7a2a8333 in Case87(unsigned int, int, svc_request*, int) () from /opt/novell/eDirectory/lib64/nds-modules/libncpengine.so
#4  0x00007ffe7a2bb087 in ExecuteNCPPacket(unsigned int, svc_request*, int) () from /opt/novell/eDirectory/lib64/nds-modules/libncpengine.so
#5  0x00007ffe7a28c393 in INCP::HandleNCPFileServiceRequest() () from /opt/novell/eDirectory/lib64/nds-modules/libncpengine.so
#6  0x00007ffe7a28e015 in INCP::Process(int, void (*)(void*, int, int, unsigned long, void const*, int (*)(void*, int, unsigned char, unsigned int, ...))) () from /opt/novell/eDirectory/lib64/nds-modules/libncpengine.so
#7  0x00007ffe7a28e30b in INCP::HandleNCPRequest(ReceiveBufferStruct*, int, int*) () from /opt/novell/eDirectory/lib64/nds-modules/libncpengine.so
#8  0x00007ffe7a28efeb in INCP::ServiceStreamGroupConnections(StreamGroupStruct*) () from /opt/novell/eDirectory/lib64/nds-modules/libncpengine.so
#9  0x00007ffe7a28f68a in NCPPollerThread(StreamGroupStruct*) () from /opt/novell/eDirectory/lib64/nds-modules/libncpengine.so
#10 0x0000000000416e38 in ?? ()
#11 0x00007ffe7d2ec7b6 in start_thread () from /lib64/libpthread.so.0
#12 0x00007ffe7c8afc6d in clone () from /lib64/libc.so.6
#13 0x0000000000000000 in ?? ()



info frame:

Stack level 0, frame at 0x7ffe63d023c0:
rip = 0x7ffe7a2ae53d in AddNetWareFileInfo(unsigned int, int, unsigned int, int, pseudo_netware_direntry*, unsigned int, int, char*, int*, int, unsigned char*, int, unsigned int, long long, stat*); saved rip 0x7ffe7a2aee00
called by frame at 0x7ffe63d02420
Arglist at 0x7ffe63d021f8, args:
Locals at 0x7ffe63d021f8, Previous frame's sp is 0x7ffe63d023c0
Saved registers:
rbx at 0x7ffe63d02388, rbp at 0x7ffe63d02390, r12 at 0x7ffe63d02398, r13 at 0x7ffe63d023a0, r14 at 0x7ffe63d023a8, r15 at 0x7ffe63d023b0, rip at 0x7ffe63d023b8




Novell Alternatives for keeping files and folders in sync are available in:
  • SUSE Linux Enterprise Server's rsync.

Please contact you local Novell sales representative, Novell consultant or Novell partner to obtain information regarding these products.

______________________________________________________________________________________________________

TID 7011285 - ncpmount issue which requires the option "-o nonfs". 

Example of ncpmount command:

ncpmount -m -S <ipaddress> -A <ipaddress>  -V <volumename> -U cn=admin.o=novell -o tcp,nonfs /mnt/