Kodi Community Forum

Full Version: Gotham Beta1 NFS accessiblity issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm typing to report an NFS accessibility issue. It's not yet sure if the issue is specific to my server / NFS set-up.
Any testing will be really appreciated. (PS: my server serves SMB well and xbmc and access it from my pad.)

The server is freeBSD based. running a custom built kernel from the freeBSD-current branch before version 10 is released.
I deployed nfsv4ACL on the server to solve the permission issue. I guess this is transparent to client but I'm not sure.

Here comes my story:

I have a openelc based xbmc managing my video library. All my videos are hosts on a freenas served through NFS.
Recently I just had a try with the new Gotham beta on my pad, aiming to share the same library from openelec.
Browsing through the library works great. But I simply cannot play any of the videos.
Checking into the log reveals NFS connection problem.

The interesting part is that Gotham android can talk to my server and access some of the files while failed with others.
This is not a permission issue, since they share the same permission setting.

drwxrwsr-x+ 7 root linux-staff 8 Jul 3 2013 Musics/
drwxrwsr-x+ 7 root linux-staff 8 Jan 12 21:09 Photos/
drwxrwsr-x+ 7 root linux-staff 9 Feb 10 23:31 Videos/

Among the three directories (from the same export), Gotham can access the first one and play the musics inside.
But there is no luck for the remaining two.
I also tried to add this NFS export directly to the video source and see the same behavior.

The log is very distinctive:
23:08:32 T:2123676280 ERROR: Failed to open(//Photos/) opendir call failed with "zdr_replymsg failed in portmap_getport_reply"
23:08:32 T:1994413704 ERROR: static bool XFILE::CDirectory::GetDirectory(const CStdString&, CFileItemList&, const XFILE::CDirectory::CHints&, bool) - Error getting nfs://192.168.1.9//mnt/data0/Media/Photos/
23:08:32 T:1994413704 ERROR: CGUIDialogFileBrowser::GetDirectory(nfs://192.168.1.9//mnt/data0/Media/Photos/) failed

23:08:52 T:2017016584 NOTICE: Thread Timer start, auto delete: false
23:08:52 T:2017016584 DEBUG: Thread Timer 2017016584 terminating
23:08:52 T:1994413704 DEBUG: CGUIMediaWindow::GetDirectory (nfs://192.168.1.9//mnt/data0/Media/Musics/)
23:08:52 T:1994413704 DEBUG: ParentPath = []
23:08:52 T:1994413704 DEBUG: RetrieveMusicInfo() took 0 msec
23:08:52 T:1994413704 DEBUG: Unfocus WindowID: 10501, ControlID: 50
23:08:52 T:2017016584 NOTICE: Thread BackgroundLoader start, auto delete: false
23:08:53 T:2123676280 DEBUG: CNFSFile::Open - opened /mnt/data0/Media/Musics/Sample Music/Folder.jpg
23:08:53 T:2123676280 DEBUG: CNFSFile::Close closing file /mnt/data0/Media/Musics/Sample Music/Folder.jpg
23:08:53 T:2123676280 DEBUG: Caching image 'nfs://192.168.1.9//mnt/data0/Media/Musics/Sample Music/Folder.jpg' to '7/7af813ed.jpg':
23:08:53 T:2123676280 DEBUG: cached image 'special://masterprofile/Thumbnails/7/7af813ed.jpg' size 200x200
23:08:53 T:2017016584 DEBUG: Thread BackgroundLoader 2017016584 terminating


By googling the error message, I was pointed to this git source page (the only result from search):
https://github.com/sahlberg/libnfs/blob/.../lib/pdu.c

There are two occations and it's not distinguishable which case I'm seeing.
What are these code for?
Code:
    if (pdu->zdr_decode_bufsize > 0) {
        if (pdu->zdr_decode_buf != NULL) {
            free(pdu->zdr_decode_buf);
        }
        pdu->zdr_decode_buf = malloc(pdu->zdr_decode_bufsize);
        if (pdu->zdr_decode_buf == NULL) {
            rpc_set_error(rpc, "zdr_replymsg failed in portmap_getport_reply");
            pdu->cb(rpc, RPC_STATUS_ERROR, "Failed to allocate buffer for decoding of ZDR reply", pdu->private_data);
            return 0;
        }
        memset(pdu->zdr_decode_buf, 0, pdu->zdr_decode_bufsize);
    }
    msg.body.rbody.reply.areply.reply_data.results.where = pdu->zdr_decode_buf;
    msg.body.rbody.reply.areply.reply_data.results.proc  = pdu->zdr_decode_fn;

    if (zdr_replymsg(zdr, &msg) == 0) {
        rpc_set_error(rpc, "zdr_replymsg failed in portmap_getport_reply");
        pdu->cb(rpc, RPC_STATUS_ERROR, "Message rejected by server", pdu->private_data);
        if (pdu->zdr_decode_buf != NULL) {
            free(pdu->zdr_decode_buf);
            pdu->zdr_decode_buf = NULL;
        }
        return 0;
    }
I reported a bug to libnfs:
https://github.com/sahlberg/libnfs/issues/60

@Memphiz
I wonder where libnfs lives in android?
I ask in case I'm provided with a debug lib and need to replace and try out.
You won't be provided with a lib - no worries ...