• 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 11
NFS issues continue with Gotham beta 2
#91
And in CNFSDirectory::Exists

Code:
if(!gNfsConnection.Connect(url,folderName)){
    CLog::Log(LOGDEBUG, "NFSDEBUGPRINTOUT: CNFSDirectory::Exists about to return false as !gNfsConnection");
    return false;
  }

gives me that in the log.

Unless I am being completely dense (and I admit I might be!) - those probs are causing the library drop. If I am right, then question becomes why is gNfsConnection.Connect now failing?
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#92
(2014-04-07, 10:07)Memphiz Wrote:
(2014-04-07, 03:44)gibxxi Wrote: AFAIK NFS doesn't support a username/password approach at all, unlike SMB.

While completly offtopic here imo i just want to tell you that NFS auth is not only based on ip. The IPs/subnets you are putting in /etc/exports only tell the server which clients are allowed to connect. Connecting is the first step but not the final one. After connecting the real read/write permissions are determined based on the uid (user id) of the connecting client. This userid is either remapped to an uid on the nfs server or the same uid has to exist on the server. Based on that uid and the normal linux/unix file system permissions nfs determines if a user can read or write or not even see anything.

So yes - no username/password, but no - its not only the granted ip range.

/offtopic.

Indeed. I decided to leave that part out because it's confusing, when set beside the standard auth methods of IP address / Username & password, and is not exposed "explicitly", at least on the NAS solution I am using. The Synology may differ in this regard so is probably worth touching on.

Smile
Image
Reply
#93
(2014-04-07, 17:05)bossanova808 Wrote: Unless I am being completely dense (and I admit I might be!) - those probs are causing the library drop. If I am right, then question becomes why is gNfsConnection.Connect now failing?

NfsConnection::Connect is Part of NFSFile.cpp - you need to add more printouts in that function and See what it is really that fails ... If there is a call to an nfs_* function failing - That needs to be Debugged in libnfs then ...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#94
ok, so it's failing to get some exports - seems to happen when it moves from MovieLibrary02 to MovieLibrary08 or similar (each of which is a separate export)

messy as crap as I am doing this over remote desktop but the issue is somewhere in splitUrlIntoExportAndPath / GetExportList I think.

It appears that sometimes

Code:
exportlist = m_pLibNfs->mount_getexports(m_resolvedHostName);
      tmp = exportlist;

      if(tmp==NULL){
         CLog::Log(LOGDEBUG, "NFSDEBUGPRINTOUT: CNfsConnection::GetExportList ********************** tmp is NULL");
      }

Code:
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath refreshing export list
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList for url [MovieLibrary01/Definitely, Maybe (2008)/Definitely, Maybe.avi]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList m_resolvedHostName [192.168.1.51]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/Movies02]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/Movies01]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/MusicLibrary]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/OtherVideos]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/HomeMovieLibrary]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/FastAlbum]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/Store01]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/TVLibrary09]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/TVLibrary07]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/TVLibrary05]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/TVLibrary04]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/TVLibrary03]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/FamilyMovies01]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/FamilyMovies10]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/MovieLibrary08]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/MovieLibrary02]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/MovieLibrary01]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList after for loop
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath (main func) for url [MovieLibrary01/Definitely, Maybe (2008)/Definitely, Maybe.avi] exportPath [] relativePath []
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath export list not empty
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath got path from url [MovieLibrary01/Definitely, Maybe (2008)/Definitely, Maybe.avi]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath path is now [/MovieLibrary01/Definitely, Maybe (2008)/Definitely, Maybe.avi]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath path does not start with current export path - doing nothing?!
09:32:33 T:8004   DEBUG: Previous line repeats 11 times.
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath startswtih
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect ret is true for url [MovieLibrary01/Definitely, Maybe (2008)/Definitely, Maybe.avi] exportPath [/MovieLibrary01] relativePath [//Definitely, Maybe (2008)/Definitely, Maybe.avi]
09:32:33 T:8004   DEBUG: NFS: Refreshing context for 192.168.1.51/MovieLibrary01, old: 79171, new: 79270
09:32:33 T:8004   DEBUG: NFS: Using cached context.
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect read chunk size
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect ret just before Connect returns is true
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNFSFile::Stat returned 0 for path //Definitely, Maybe (2008)/Definitely, Maybe.avi
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNFSFile::Exists for url MovieLibrary01/Descendants (2008)/Descendants.mkv
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath for url [MovieLibrary01/Descendants (2008)/Descendants.mkv] exportPath [] relativePath []
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath refreshing export list
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList for url [MovieLibrary01/Descendants (2008)/Descendants.mkv]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList m_resolvedHostName [192.168.1.51]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList ********************** tmp is NULL
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList after for loop
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath (main func) for url [MovieLibrary01/Descendants (2008)/Descendants.mkv] exportPath [] relativePath []
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect ret is false for url [MovieLibrary01/Descendants (2008)/Descendants.mkv] exportPath [] relativePath []
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect ret just before Connect returns is false
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNFSFile::Stat about to return -1 as !gNfsConnection
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNFSFile::Exists for url MovieLibrary08/Dinner for Schmucks (2010)/Dinner for Schmucks.mkv
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath for url [MovieLibrary08/Dinner for Schmucks (2010)/Dinner for Schmucks.mkv] exportPath [] relativePath []
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath refreshing export list
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList for url [MovieLibrary08/Dinner for Schmucks (2010)/Dinner for Schmucks.mkv]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList m_resolvedHostName [192.168.1.51]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/Movies02]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/Movies01]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/MusicLibrary]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/OtherVideos]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/HomeMovieLibrary]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/FastAlbum]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/Store01]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/TVLibrary09]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/TVLibrary07]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/TVLibrary05]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/TVLibrary04]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/TVLibrary03]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/FamilyMovies01]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/FamilyMovies10]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/MovieLibrary08]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/MovieLibrary02]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/MovieLibrary01]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList after for loop
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath (main func) for url [MovieLibrary08/Dinner for Schmucks (2010)/Dinner for Schmucks.mkv] exportPath [] relativePath []
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath export list not empty
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath got path from url [MovieLibrary08/Dinner for Schmucks (2010)/Dinner for Schmucks.mkv]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath path is now [/MovieLibrary08/Dinner for Schmucks (2010)/Dinner for Schmucks.mkv]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath path does not start with current export path - doing nothing?!
09:32:33 T:8004   DEBUG: Previous line repeats 9 times.
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath startswtih
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect ret is true for url [MovieLibrary08/Dinner for Schmucks (2010)/Dinner for Schmucks.mkv] exportPath [/MovieLibrary08] relativePath [//Dinner for Schmucks (2010)/Dinner for Schmucks.mkv]
09:32:33 T:8004   DEBUG: NFS: Refreshing context for 192.168.1.51/MovieLibrary08, old: 79226, new: 79318
09:32:33 T:8004   DEBUG: NFS: Using cached context.
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect read chunk size
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect ret just before Connect returns is true
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNFSFile::Stat returned 0 for path //Dinner for Schmucks (2010)/Dinner for Schmucks.mkv

...just keeping you up to date with progress as I trace it - but let me know if you have any brainwaves. I guess from here I need to look at why exportlist = m_pLibNfs->mount_getexports(m_resolvedHostName);

...is returning null sometimes

(and that's in libnfs right?)

(also how do I log in libnfs - jsut with a standard printf?? And then run from console? Or will that go to xbmc log??)

seems to be in here:

libnfssync.c

Code:
struct exportnode *mount_getexports(const char *server)
{
    struct sync_cb_data cb_data;
    struct rpc_context *rpc;


    cb_data.is_finished = 0;
    cb_data.return_data = NULL;

    rpc = rpc_init_context();
    if (mount_getexports_async(rpc, server, mount_getexports_cb, &cb_data) != 0) {
        rpc_destroy_context(rpc);
        return NULL;
    }

    wait_for_reply(rpc, &cb_data);
    rpc_destroy_context(rpc);

    return cb_data.return_data;
}
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#95
To mkake this a bit clearer hopefully:

Code:
std::list<std::string> CNfsConnection::GetExportList(const CURL &url)
{

    CLog::Log(LOGDEBUG, "NFSDEBUGPRINTOUT: CNfsConnection::GetExportList for url [%s]", url.GetFileName().c_str());
    std::list<std::string> retList;

    if(HandleDyLoad())
    {
      struct exportnode *exportlist, *tmp;
      CLog::Log(LOGDEBUG, "NFSDEBUGPRINTOUT: CNfsConnection::GetExportList m_resolvedHostName [%s]", m_resolvedHostName.c_str());

      exportlist = m_pLibNfs->mount_getexports(m_resolvedHostName);
      tmp = exportlist;

      if(tmp==NULL){
         CLog::Log(LOGDEBUG, "NFSDEBUGPRINTOUT: CNfsConnection::GetExportList ********************** tmp is NULL");
      }

      for(tmp = exportlist; tmp!=NULL; tmp=tmp->ex_next)
      {
        std::string exportStr = std::string(tmp->ex_dir);
        CLog::Log(LOGDEBUG, "NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [%s]", exportStr.c_str());
        retList.push_back(exportStr);
      }      
      
      CLog::Log(LOGDEBUG, "NFSDEBUGPRINTOUT: CNfsConnection::GetExportList after for loop");

      gNfsConnection.GetImpl()->mount_free_export_list(exportlist);
      retList.sort();
      retList.reverse();
    }
    else{
        CLog::Log(LOGDEBUG, "NFSDEBUGPRINTOUT: CNfsConnection::GetExportList HandleDyLoad returned false");
    }
    return retList;
}

Ont he first call logged above...

Code:
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList for url [MovieLibrary01/Definitely, Maybe (2008)/Definitely, Maybe.avi]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList m_resolvedHostName [192.168.1.51]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/Movies02]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/Movies01]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList exportStr [/MusicLibrary]
etc

then just a bit later the same call I think gives a different result:

Code:
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath for url [MovieLibrary01/Descendants (2008)/Descendants.mkv] exportPath [] relativePath []
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath refreshing export list
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList for url [MovieLibrary01/Descendants (2008)/Descendants.mkv]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList m_resolvedHostName [192.168.1.51]
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList ********************** tmp is NULL
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList after for loop
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath (main func) for url [MovieLibrary01/Descendants (2008)/Descendants.mkv] exportPath [] relativePath []
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect ret is false for url [MovieLibrary01/Descendants (2008)/Descendants.mkv] exportPath [] relativePath []
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect ret just before Connect returns is false
09:32:33 T:8004   DEBUG: NFSDEBUGPRINTOUT: CNFSFile::Stat about to return -1 as !gNfsConnection

so this would appear to imply that: exportlist = m_pLibNfs->mount_getexports(m_resolvedHostName);

...is returning different things just moments apart.

I know my logging is messy (20 years since I did any C) - but I think I am reading that right.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#96
...and following on...

when the exports list comes back null, it is failing in the wait_for_reply part of mount_getexports with an rpc_service_failed issue

Code:
        if (rpc_service(rpc, pfd.revents) < 0) {
            rpc_set_error(rpc, "rpc_service failed");
            printf(" &&&&&&&& RPC SERVICE FAILED ");
            cb_data->status = -EIO;
            break;
        }


Code:
12:36:15 T:11400   DEBUG: NFSDEBUGPRINTOUT: CNFSFile::Exists for url TVLibrary04/10 Things I Hate About You/Season 01/10 Things I Hate About You - S01E02 - I Want You to Want Me.avi
12:36:15 T:11400   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath for url [TVLibrary04/10 Things I Hate About You/Season 01/10 Things I Hate About You - S01E02 - I Want You to Want Me.avi] exportPath [] relativePath []
12:36:15 T:11400   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath refreshing export list
12:36:15 T:11400   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList for url [TVLibrary04/10 Things I Hate About You/Season 01/10 Things I Hate About You - S01E02 - I Want You to Want Me.avi]
12:36:15 T:11400   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList m_resolvedHostName [192.168.1.51]
12:36:15 T:11400   DEBUG:   msg: LIBNFSDEBUG::mount_getexports
12:36:15 T:11400   DEBUG:   msg: LIBNFSDEBUG::mount_getexports_async entered
12:36:15 T:11400   DEBUG:   msg: LIBNFSDEBUG::mount_getexports_async returning zero
12:36:15 T:11400   DEBUG:   msg: LIBNFSDEBUG::mount_getexports wait_for_reply
12:36:15 T:11400   DEBUG:   msg:  &&&&&&&& RPC SERVICE FAILED
12:36:15 T:11400   DEBUG:   msg: LIBNFSDEBUG::mount_getexports after wait_for_reply
12:36:15 T:11400   DEBUG:   msg: LIBNFSDEBUG::mount_getexports (null)
12:36:15 T:11400   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList ********************** tmp is NULL
12:36:15 T:11400   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList after for loop
12:36:15 T:11400   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath (main func) for url [TVLibrary04/10 Things I Hate About You/Season 01/10 Things I Hate About You - S01E02 - I Want You to Want Me.avi] exportPath [] relativePath []
12:36:15 T:11400   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect ret is false for url [TVLibrary04/10 Things I Hate About You/Season 01/10 Things I Hate About You - S01E02 - I Want You to Want Me.avi] exportPath [] relativePath []
12:36:15 T:11400   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect ret just before Connect returns is false
12:36:15 T:11400   DEBUG: NFSDEBUGPRINTOUT: CNFSFile::Stat about to return -1 as !gNfsConnection


....where to from here?? I have put info on the github issue too...
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#97
You nailed it pretty much if you ask me. Grats :o). Maybe try to capture this moment via wireshark and attach that network capture to sahlbergs github issue aswell. From there on he might find a fix.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#98
took me long enough!! Smile

I'll do a wireshark in the next few hours with any luck.

Thanks for all your help along the way - seriously. Above and beyond, & much appreciated...I know I fumbled about a lot along the way, but this stuff is a long long way from my day job these days!

Hopefully we get a result from here!!
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#99
Nice bossanova808!!!
Reply
@bossanova808 what really wonders me here is why this call is called so often on your setup. Normally mount_getexports should only be run once. At least if you are not using multiple nfs servers with different IPs at the same time. See:

https://github.com/xbmc/xbmc/blob/master...e.cpp#L230

So basically this should only be called when we have never fetched the export list from the server or the hostname changes. You could add a log in there and log url.GetHostName().c_str() and m_hostName.c_str() to see why those differ for you. (you should really consider logging url.Get().c_str() instead of only the path Wink ).
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
@Memphiz

Just sneaking ths in before work - the export list is empty, it's not the string comparison that fails?

Code:
08:26:31 T:5012   DEBUG: NFSDEBUGPRINTOUT: CNFSFile::Exists for url MovieLibrary08/Hannibal Rising (2007)/Hannibal Rising.mkv
08:26:31 T:5012   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath for url [MovieLibrary08/Hannibal Rising (2007)/Hannibal Rising.mkv] exportPath [] relativePath []
08:26:31 T:5012   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath refreshing export list url hostname [192.168.1.51] m_host_name [192.168.1.51]

***** 08:26:31 T:5012   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath export list IS empty!!!!

08:26:31 T:5012   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList for url filename [MovieLibrary08/Hannibal Rising (2007)/Hannibal Rising.mkv]
08:26:31 T:5012   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList for url [nfs://192.168.1.51/MovieLibrary08/Hannibal Rising (2007)/Hannibal Rising.mkv]
08:26:31 T:5012   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList m_resolvedHostName [192.168.1.51]
08:26:31 T:5012   DEBUG:   msg: LIBNFSDEBUG::mount_getexports
08:26:31 T:5012   DEBUG:   msg: LIBNFSDEBUG::mount_getexports_async entered
08:26:31 T:5012   DEBUG:   msg: LIBNFSDEBUG::mount_getexports_async returning zero
08:26:31 T:5012   DEBUG:   msg: LIBNFSDEBUG::mount_getexports wait_for_reply
08:26:31 T:5012   DEBUG:   msg:  &&&&&&&& RPC SERVICE FAILED FAILED
08:26:31 T:5012   DEBUG:   msg: LIBNFSDEBUG::mount_getexports after wait_for_reply
08:26:31 T:5012   DEBUG:   msg: LIBNFSDEBUG::mount_getexports (null)
08:26:31 T:5012   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList ********************** tmp is NULL
08:26:31 T:5012   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::GetExportList after for loop
08:26:31 T:5012   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::splitUrlIntoExportAndPath (main func) for url [MovieLibrary08/Hannibal Rising (2007)/Hannibal Rising.mkv] exportPath [] relativePath []
08:26:31 T:5012   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect ret is false for url [MovieLibrary08/Hannibal Rising (2007)/Hannibal Rising.mkv] exportPath [] relativePath []
08:26:31 T:5012   DEBUG: NFSDEBUGPRINTOUT: CNfsConnection::Connect ret just before Connect returns is false
08:26:31 T:5012   DEBUG: NFSDEBUGPRINTOUT: CNFSFile::Stat about to return -1 as !gNfsConnection

(one could argue that no matter how many times one calls for the exports, though, the result should be the same - that is, there's some issue at the libnfs/server end no matter what I think. But obviously if xbmc just calls for them once, or occasionally, it will probably work just fine in practise...)

So, what wipes the member variable export list I wonder??
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
Hmmm, I am stuck at work now but looking at it:

::Connect calls
int contextRet = getContextForExport(url.GetHostName() + exportPath);

...which in turn calls clearMembers() which contains:

m_exportList.clear();

...boom, bye bye exportlist.

So then we have an empty export list and we need to go off and get them again. And something about libnfs gets cranky when this is called over and over.

I'm a little confused about the passed in export_list vs. m_exportList and what should be happening.

I can't get in to it much from here but look at the git history I am thinking maybe the issue arises around here:
https://github.com/xbmc/xbmc/commit/7d72...3f74f02888

....where splitUrlIntoExportAndPath was changed to be able to pass in an exportlist

I will try and get more done tonight but for some reason xbmc won't run over RDP for me at the moment suddenly, sigh.

(also, m_exportList is missing from the constructor? is that deliberate?)
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
Ok I think I get it

Code:
bool CNfsConnection::Connect(const CURL& url, CStdString &relativePath)
{
  CSingleLock lock(*this);
  bool ret = false;
  int nfsRet = 0;
  CStdString exportPath = "";

  resolveHost(url);
  ret = splitUrlIntoExportAndPath(url, exportPath, relativePath);
  
  if( (ret && (!exportPath.Equals(m_exportPath,true) ||
      !url.GetHostName().Equals(m_hostName,false))) ||
      (XbmcThreads::SystemClockMillis() - m_lastAccessedTime) > CONTEXT_TIMEOUT )
  {
    int contextRet = getContextForExport(url.GetHostName() + exportPath);

Basically, getContextForExport is called if we're changing either the hostname (which is never the case for me) - the export path (which is frequently the case) or the context times out.

So - and while I can't get a log from here - this corresponds to seeing these things failing when xbmcs moves to processing the media from a new export path. getContextForExport() clears the m_exportList so that a new one is then retrieved (and this is the bit that fails, and shouldn't).

I actually think one could just comment out the m_exportList.clear() in the clearMembers function - given for the same server (hostname) it is unlikely to change during a run.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
That Commit you pointed out is not it - it was just a refactor for Unit testing which didn't change behavior.

The real thing is that the Exportlist is cleared when only the Path changed. This leads to so many calls for you as your exportpath changes always.

Removing the clear might be the right thing to do - but it will also hide the problem in libnfs.

Both needs to be fixed (i Take care of the exportlist clear thingy as it is a platform agnostic problem)
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
(Yeah I worked that out. I'm getting the hang of C++ syntax a bit at least at last. My main OO experience is java and python which are a little more syntactically forgiving....or, easy to follow at least. I'm almost beginning to think one day I might actually be able to contribute some actual code to this beast...well, I can dream!!)

Anyways, I can confirm:

Using XBMC (master from April 3 technically)
libnfs from your github

and commenting this one line (all the rest of my changes are pure prints):

Code:
void CNfsConnection::clearMembers()
{
    m_exportPath.clear();
    m_hostName.clear();
    //m_exportList.clear();
    m_writeChunkSize = 0;
    m_readChunkSize = 0;  
    m_pNfsContext = NULL;
    m_KeepAliveTimeouts.clear();
}

...allows me to

a) clean my library repetitively without issues AND
b) see all my artwork

...on both my server running xbmc directly AND my laptop....identical results.

There's no doubt it's masking an issue in libnfs but it does seem to be doing it very effectively.

My belief is it's basically some sort of race condition in the mounts request thing - the packets come so hard and fast (and are now seemingly processed async by libnfs) - that something in there goes pear shaped. By calling it only once at the beginning it very effectively sidesteps the problem. And probably speeds up xbmc nfs to boot.

So - I'm calling it fixed, basically.

If you agree - I presume w can we sneak this in to Gotham? Should kill the artwork birds and library issues in one go, with any luck.

Sounds like you'll do a PR? If you're busy I think I can manage a one line PR Wink
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
  • 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 11

Logout Mark Read Team Forum Stats Members Help
NFS issues continue with Gotham beta 20