Bug Kodi 22 Alpha1 (kodi-20241206-5bdf1d42-master-armeabi-v7a.apk and later) SMB bug
#1
Hi, not sure where to post this as I assume the bugtracker link at top of forum is for current stable version (Kodi 21) - moderators please move this if necessary.

So the problem I am having is I am trying to access a smb share on a windows pc from my android device - the folder has a few m3u and strm files.  When clicking to open, it literally takes longer than 2 minutes to open.

On nightly versions kodi-20241206-5bdf1d42-master-armeabi-v7a.apk upto the latest kodi-20250106-f6b26711-master-armeabi-v7a.apk it is broken
So the latest version without the bug (that I'm currently using) is kodi-20241204-0cbcd6ba-master-armeabi-v7a.apk

So just some feedback from my side to help improve future nightly versions.
Reply
#2
This is where a debug log (wiki) would be helpful.
Reply
#3
SMB (wiki) and https://forum.kodi.tv/showthread.php?tid=362113
Reply
#4
(2025-01-07, 18:00)otinley Wrote: This is where a debug log (wiki) would be helpful.

Log is here:
 
Code:
https://paste.kodi.tv/adoyixebol.kodi

The interesting part is this:
 
Code:
2025-01-07 19:38:16.084 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/henryiptv2.m3u, fd=10000
2025-01-07 19:38:20.172 T:13488   debug <general>: CurlFile::Open - <http://192.168.1.20:3911/ >
2025-01-07 19:38:20.175 T:13488   debug <general>: easy_acquire - Created session to http://192.168.1.20
2025-01-07 19:38:20.176 T:13488   error <general>: CCurlFile::CReadState::FillBuffer - (0xcc246140) Failed: URL using bad/illegal format or missing URL(3)
2025-01-07 19:38:20.176 T:13488   error <general>: CCurlFile::Open - <http://192.168.1.20:3911/ > Failed with code 0:
                                                  
2025-01-07 19:38:24.575 T:13433   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 19:38:24.591 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/henryiptvFINAL.m3u, fd=10000
2025-01-07 19:38:41.426 T:13477   debug <general>: Thread JobWorker -896005856 terminating (autodelete)
2025-01-07 19:38:41.426 T:13474   debug <general>: Thread JobWorker -911210208 terminating (autodelete)
2025-01-07 19:38:41.428 T:13476   debug <general>: Thread JobWorker -894961376 terminating (autodelete)
2025-01-07 19:38:41.434 T:13518   debug <general>: Thread JobWorker -944817888 terminating (autodelete)
2025-01-07 19:39:07.132 T:13658   debug <general>: Thread JobWorker start, auto delete: true
2025-01-07 19:39:07.134 T:13475   debug <general>: Thread Timer -937916128 terminating
2025-01-07 19:39:07.134 T:13658   debug <general>: [threads] name: 'JobWorker' priority: '-9'
2025-01-07 19:39:07.209 T:13658   debug <general>: ScanOldestCache: begin process to clean image cache
2025-01-07 19:39:07.211 T:13658   debug <general>: ScanOldestCache: found no old cached images to process
2025-01-07 19:39:07.211 T:13658   debug <general>: ScanOldestCache: scheduling the next image cache cleaning in 48 hours
2025-01-07 19:39:07.214 T:13659   debug <general>: Thread Timer start, auto delete: false
2025-01-07 19:39:13.921 T:13433   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 19:39:13.996 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/henryiptvFINAL.m3u_backup.m3u, fd=10000

Here we can see that since reading henryiptv2.m3u the whole process takes about a minute for reading the next 2 files

Like I said above, the last nightly build without this error is kodi-20241204-0cbcd6ba-master-armeabi-v7a.apk
Reply
#5
No.

It reads the m3u from 192.168.1.7 in basically no time, but the opens the playlist entry, most likely something like: http://192.168.1.20:3911 on 192.168.1.20 and fails. I do not see an smb issue at all, but a broken m3u referencing to a different host (.1.20)
Please post the content of the m3u.

So please put a normal video / mkv file into you share and please play that.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#6
(2025-01-07, 21:24)fritsch Wrote: No.

It reads the m3u from 192.168.1.7 in basically no time, but the opens the playlist entry, most likely something like: http://192.168.1.20:3911 on 192.168.1.20 and fails. I do not see an smb issue at all, but a broken m3u referencing to a different host (.1.20)
Please post the content of the m3u.

So please put a normal video / mkv file into you share and please play that.
Your theory does not make sense.  Explain the following:
  1.  Why does opening this folder on Kodi 21 and Kodi 22 upto 20241204 only take 3 seconds?
  2. The problem is not trying to open any m3u or even playing an item inside, but rather just displaying the m3u file items in the folder.
  3. I'm not posting any content of the m3u files as it has sensitive info but I can assure you there is no reference to 192.168.1.20 as I don't use ip addresses in my m3us and all is external http links.  Just to be 100% sure I did a text search for 192.168.1.20 in all the files in the folder and it came up empty.
  4. For some reason as you can see in the log it is connecting to 192.168.1.20 on port 3911 which is my Deskjet printer's printer status port  (connected via wifi to my network).  No idea why Kodi even tries to connect to this (http) port that is running on the printer.
If you want I can post a log of what is and should be happening normally when trying to open the folder - taking only 3 seconds - using my current nightly (kodi-20241204-0cbcd6ba-master-armeabi-v7a)
Reply
#7
(2025-01-07, 22:38)enerdude Wrote: If you want I can post a log of what is and should be happening normally when trying to open the folder - taking only 3 seconds - using my current nightly (kodi-20241204-0cbcd6ba-master-armeabi-v7a)
Ok so here it is in any case:
 
Code:
https://paste.kodi.tv/gilukebiwo.kodi

So for the working nightly (kodi-20241204-0cbcd6ba-master-armeabi-v7a) the relevent part is:
 
Code:
2025-01-07 23:20:00.718 T:14213   debug <general>: ------ Window Init (MyVideoNav.xml) ------
2025-01-07 23:20:00.718 T:14213    info <general>: Loading skin file: MyVideoNav.xml, load type: KEEP_IN_MEMORY
2025-01-07 23:20:00.934 T:14213   debug <general>: CGUIMediaWindow::GetDirectory (smb://192.168.1.7/myprograms/MYSTREAMS/)
2025-01-07 23:20:00.935 T:14213   debug <general>:   ParentPath = []
2025-01-07 23:20:01.167 T:14213   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/henryiptv.m3u, fd=10000
2025-01-07 23:20:01.213 T:14213   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 23:20:01.220 T:14213   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/henryiptv2.m3u, fd=10000
2025-01-07 23:20:01.507 T:14213   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 23:20:01.519 T:14213   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/henryiptvFINAL.m3u, fd=10000
2025-01-07 23:20:02.211 T:14213   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 23:20:02.242 T:14213   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/henryiptvFINAL.m3u_backup.m3u, fd=10000
2025-01-07 23:20:03.085 T:14213   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 23:20:03.114 T:14213   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/http-test.strm, fd=10000
2025-01-07 23:20:03.131 T:14213   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 23:20:03.137 T:14213   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/rtsp-test.strm, fd=10000
2025-01-07 23:20:03.156 T:14213   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 23:20:03.163 T:14213   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/rumsport_channels_scanned_noname.m3u, fd=10000
2025-01-07 23:20:03.823 T:14213   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 23:20:03.839 T:14213   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/rumsport_livetv2_uk.m3u, fd=10000
2025-01-07 23:20:03.985 T:14213   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 23:20:03.995 T:14213   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/rumsport_livetv_uk.m3u, fd=10000
2025-01-07 23:20:04.258 T:14213   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 23:20:04.269 T:14213   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/sky sports tennis UHD.strm, fd=10000
2025-01-07 23:20:04.288 T:14213   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 23:20:04.296 T:14213   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/test.m3u, fd=10000
2025-01-07 23:20:05.051 T:14213   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 23:20:05.075 T:14213   debug <general>: Saving fileitems [smb://192.168.1.7/myprograms/MYSTREAMS/]
2025-01-07 23:20:05.077 T:14213   debug <general>:   -- items: 11, sort method: 0, ascending: true

....and for the broken nightly (kodi-20250106-f6b26711-master-armeabi-v7a) the relevant part is:
 
Code:
2025-01-07 19:38:14.936 T:13433   debug <general>: ------ Window Init (MyVideoNav.xml) ------
2025-01-07 19:38:14.936 T:13433    info <general>: Loading skin file: MyVideoNav.xml, load type: KEEP_IN_MEMORY
2025-01-07 19:38:15.161 T:13433   debug <general>: CGUIMediaWindow::GetDirectory (smb://192.168.1.7/myprograms/MYSTREAMS/)
2025-01-07 19:38:15.162 T:13433   debug <general>:   ParentPath = []
2025-01-07 19:38:15.488 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/henryiptv.m3u, fd=10000
2025-01-07 19:38:16.078 T:13433   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 19:38:16.084 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/henryiptv2.m3u, fd=10000
2025-01-07 19:38:20.172 T:13488   debug <general>: CurlFile::Open - <http://192.168.1.20:3911/ >
2025-01-07 19:38:20.175 T:13488   debug <general>: easy_acquire - Created session to http://192.168.1.20
2025-01-07 19:38:20.176 T:13488   error <general>: CCurlFile::CReadState::FillBuffer - (0xcc246140) Failed: URL using bad/illegal format or missing URL(3)
2025-01-07 19:38:20.176 T:13488   error <general>: CCurlFile::Open - <http://192.168.1.20:3911/ > Failed with code 0:
                                                   
2025-01-07 19:38:24.575 T:13433   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 19:38:24.591 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/henryiptvFINAL.m3u, fd=10000
2025-01-07 19:38:41.426 T:13477   debug <general>: Thread JobWorker -896005856 terminating (autodelete)
2025-01-07 19:38:41.426 T:13474   debug <general>: Thread JobWorker -911210208 terminating (autodelete)
2025-01-07 19:38:41.428 T:13476   debug <general>: Thread JobWorker -894961376 terminating (autodelete)
2025-01-07 19:38:41.434 T:13518   debug <general>: Thread JobWorker -944817888 terminating (autodelete)
2025-01-07 19:39:07.132 T:13658   debug <general>: Thread JobWorker start, auto delete: true
2025-01-07 19:39:07.134 T:13475   debug <general>: Thread Timer -937916128 terminating
2025-01-07 19:39:07.134 T:13658   debug <general>: [threads] name: 'JobWorker' priority: '-9'
2025-01-07 19:39:07.209 T:13658   debug <general>: ScanOldestCache: begin process to clean image cache
2025-01-07 19:39:07.211 T:13658   debug <general>: ScanOldestCache: found no old cached images to process
2025-01-07 19:39:07.211 T:13658   debug <general>: ScanOldestCache: scheduling the next image cache cleaning in 48 hours
2025-01-07 19:39:07.214 T:13659   debug <general>: Thread Timer start, auto delete: false
2025-01-07 19:39:13.921 T:13433   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 19:39:13.996 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/henryiptvFINAL.m3u_backup.m3u, fd=10000
2025-01-07 19:39:14.914 T:13456   debug <general>: Draining Audio
2025-01-07 19:39:24.916 T:13456   debug <general>: CAESinkAUDIOTRACK::Deinitialize
2025-01-07 19:39:37.216 T:13658    info <general>: Skipped 1 duplicate messages..
2025-01-07 19:39:37.215 T:13658   debug <general>: Thread JobWorker -894961376 terminating (autodelete)
2025-01-07 19:40:02.271 T:13433   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 19:40:02.351 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/http-test.strm, fd=10000
2025-01-07 19:40:02.371 T:13433   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 19:40:02.377 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/rtsp-test.strm, fd=10000
2025-01-07 19:40:02.394 T:13433   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 19:40:02.400 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/rumsport_channels_scanned_noname.m3u, fd=10000
2025-01-07 19:40:12.822 T:13433   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 19:40:12.847 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/rumsport_livetv2_uk.m3u, fd=10000
2025-01-07 19:40:15.929 T:13433   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 19:40:15.941 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/rumsport_livetv_uk.m3u, fd=10000
2025-01-07 19:40:21.484 T:13433   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 19:40:21.501 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/sky sports tennis UHD.strm, fd=10000
2025-01-07 19:40:21.523 T:13433   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 19:40:21.530 T:13433   debug <general>: CSMBFile::Open - opened smb://USERNAME:[email protected]/myprograms/MYSTREAMS/test.m3u, fd=10000
2025-01-07 19:41:12.132 T:13433   debug <general>: CSMBFile::Close closing fd 10000
2025-01-07 19:41:12.187 T:13433   debug <general>: Saving fileitems [smb://192.168.1.7/myprograms/MYSTREAMS/]
2025-01-07 19:41:12.194 T:13433   debug <general>:   -- items: 11, sort method: 0, ascending: true

As a further measure to prove it has nothing to do with the content of the m3u files, I copied the whole network folder to a usb stick, inserted it into my android device and opened the folder (also via Kodi Videos main menu item) and it opened without a problem in 3 seconds.
Reply
#8
I think the easiest way to investigate is if you can find the first nightly that broke. By doing a binary search you should be able to identify it by testing about ~5 versions. Start in the middle of the known good and bad versions, with kodi-20241222-4af868a4-master-armeabi-v7a.apk. Depending on if this version works or not you select your next version from the middle of the older or newer half. Rinse and repeat.
Reply
#9
(2025-01-08, 00:32)Neo1973 Wrote: I think the easiest way to investigate is if you can find the first nightly that broke. By doing a binary search you should be able to identify it by testing about ~5 versions. Start in the middle of the known good and bad versions, with kodi-20241222-4af868a4-master-armeabi-v7a.apk. Depending on if this version works or not you select your next version from the middle of the older or newer half. Rinse and repeat.

Already done that. On the nightlies download page:
Code:
https://mirrors.kodi.tv/nightlies/android/arm/master/

...there are nightlies ranging from 20241127 - 20250106

So the first one that broke was 20241206, then onwards for all nightlies up to the latest 20250106.
Like I said before, I am using 20241204 which is the nightly just before 20241206
Reply
#10
Ah sorry, I didn't get that. Not many commits in that range that could cause trouble here: https://github.com/xbmc/xbmc/compare/0cb...b2fd63a035
Reply
#11
Here a build will result with revchunk in name: https://jenkins.kodi.tv/job/android-arm-docker/9386/
Please test this. That reverts: https://github.com/xbmc/xbmc/commit/e13c...7db047d41a which due to its File.cpp changes could be the culprit.

Edit: https://jenkins.kodi.tv/job/android-arm-...bi-v7a.apk direct link - valid roughly 24 hours.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#12
(2025-01-08, 08:20)fritsch Wrote: Here a build will result with revchunk in name: https://jenkins.kodi.tv/job/android-arm-docker/9386/
Please test this. That reverts: https://github.com/xbmc/xbmc/commit/e13c...7db047d41a which due to its File.cpp changes could be the culprit.

Edit: https://jenkins.kodi.tv/job/android-arm-...bi-v7a.apk direct link - valid roughly 24 hours.

Hi thanks, yes, I can confirm kodi-20250108-881080ee-revchunk-armeabi-v7a.apk solves the issue.
Reply
#13
Thanks for the feedback. @jogal fyi
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#14
(2025-01-07, 22:38)enerdude Wrote: I'm not posting any content of the m3u files as it has sensitive info but I can assure you there is no reference to 192.168.1.20 as I don't use ip addresses in my m3us and all is external http links.
 
(2025-01-07, 22:38)enerdude Wrote: For some reason as you can see in the log it is connecting to 192.168.1.20 on port 3911 which is my Deskjet printer's printer status port  (connected via wifi to my network).  No idea why Kodi even tries to connect to this (http) port that is running on the printer.


It's not easy to know exactly what's going on without being able to reproduce it locally or debug it, but I have an idea.

This is not the revert but only a small change:

https://jenkins.kodi.tv/job/android-arm-...bi-v7a.apk

@enerdude please test it.
Reply
#15
(2025-01-08, 18:13)jogal Wrote: This is not the revert but only a small change:

https://jenkins.kodi.tv/job/android-arm-...bi-v7a.apk

@enerdude please test it.
Yeah I can confirm kodi-20250108-f934761e-fix-chunk-armeabi-v7a also fixes the issue.

Edit:  So it looks like it fixed the long folder opening issue but introduced some other problem:  it asks me twice for my smb login details when adding the initial network location.  I captured a log file for you:
 
Code:
https://paste.kodi.tv/puzujiqiga.kodi

I basically started with a clean install of the kodi apk you provided and then had debugging on for the log file.  I proceeded to add 192.168.1.7 smb server and after entering username and password correctly it popped up again with a prompt for username / password.
Initially I thought I made a typo but I deleted the network location and quit kodi and 'rinsed and repeat' 3 times, each time Kodi pops up a second time for the credentials.

Errors I can see in the log is that it still tries to connect to my HP Deskjet on port 3911 and then also throws a 'Permission denied' error when trying to open the network location, even though I entered a CORRECT password.

After entering the credentials twice I can successfuly open the MYSTREAMS folder in 3 seconds, as you can see in the log file, so that part is working.


Edit 2: Ok so just to be 100% sure I uninstalled the apk and re-installed, this time there was no 2nd prompts for credentials, it worked first time.  But I DID try it 3 times in a row with the same result as mentioned above so I am not sure if the log file can tell you why it failed with "permission denied", maybe something to do with the firewall / smb version on the server but I have not had this error with Kodi 21 which I used for a long time.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi 22 Alpha1 (kodi-20241206-5bdf1d42-master-armeabi-v7a.apk and later) SMB bug0