Bug 12184 - Loading shared RPC modules failed
Summary: Loading shared RPC modules failed
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.5.0rc2
Hardware: All Solaris
: P5 normal (vote)
Target Milestone: 4.5
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-26 17:37 UTC by Tom Schulz
Modified: 2017-02-13 15:55 UTC (History)
3 users (show)

See Also:


Attachments
Patch for 4.5 cherry-picked from master (1.38 KB, patch)
2016-09-06 13:54 UTC, Ralph Böhme
metze: review+
Details
Patch for master (1.69 KB, patch)
2017-01-30 17:59 UTC, Ralph Böhme
jra: review+
slow: review? (metze)
Details
Patch for 4.5 and 4.6 cherry-picked from master (1.80 KB, patch)
2017-01-31 07:01 UTC, Ralph Böhme
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Schulz 2016-08-26 17:37:38 UTC
From the samba mailing list:

>> I am testing Samba 4.5.0rc2 on a Solaris 10 i386 box. log.smbd contains
>> a new message/error that does not show up on Samba 4.4.5. The error is:
>> 
>> [2016/08/26 11:45:54.886237,  0]
>>       ../source3/rpc_server/rpc_service_setup.c:539(dcesrv_ep_setup)
>>   dcesrv_ep_setup: Loading shared RPC modules failed
>> 
>> Dispite that, Samba 4.5.0rc2 seems to work correctly. Is this a problem
>> or not?
>
>nothing too bad, but please file a bugreport so I can track this. To
>get rid of it you can
>
># smbd -b | grep MODULESDIR
>
># mkdir MODULESDIR/rpc
>
>This should get rid of it.
>
>Cheerio!
>-slow

That fixes it. It looks like install fails to make that directory.
Comment 1 Chris Smith 2016-08-26 20:00:45 UTC
Same problem here with Samba Version 4.5.0rc3-GIT-eb55718 compiled from source:

Aug 26 12:21:37 sartre systemd[1]: Starting Samba SMB/CIFS server...
Aug 26 12:21:37 sartre systemd[1]: smbd.service: Supervising process 5373 which is not our child. We'll most likely not notice when it exits.
Aug 26 12:21:37 sartre smbd[5373]: [2016/08/26 12:21:37.882508,  0] ../source3/rpc_server/rpc_service_setup.c:539(dcesrv_ep_setup)
Aug 26 12:21:37 sartre smbd[5373]:   dcesrv_ep_setup: Loading shared RPC modules failed

Seems the RPC folder does not get made as the same workaround resolves.
Comment 2 Chris Smith 2016-08-26 20:02:15 UTC
(In reply to Chris Smith (bugmail disabled due to bounces) from comment #1)

Note: my issue was on Linux.
Comment 3 Stefan Metzmacher 2016-09-06 12:40:10 UTC
Ping!

We do need 58889e04bd545d7420d1193e134351bd0ccb8430 backported...
Comment 4 Ralph Böhme 2016-09-06 13:54:49 UTC
Created attachment 12444 [details]
Patch for 4.5 cherry-picked from master
Comment 5 Ralph Böhme 2016-09-06 14:09:25 UTC
Reassigning to metze for inclusion in 4.5.
Comment 6 Stefan Metzmacher 2016-09-06 14:10:56 UTC
Pushed to autobuild-v4-5-test.
Comment 7 Stefan Metzmacher 2016-09-07 15:10:34 UTC
Pushed to v4-5-test
Comment 8 Ralph Böhme 2017-01-30 17:48:51 UTC
The fix was wrong, it results in the setup function not being called for any static module relying on run_init_functions() to call the module setup function, mdssvc being the only one atm.

To fix it:

--- a/source3/rpc_server/rpc_service_setup.c
+++ b/source3/rpc_server/rpc_service_setup.c
@@ -546,8 +546,8 @@ bool dcesrv_ep_setup(struct tevent_context *ev_ctx,
                        DBG_ERR("Loading shared RPC modules failed [%s]\n",
                                strerror(errno));
                        ok = false;
+                       goto done;
                }
-               goto done;
        }
 
        ok = run_init_functions(mod_init_fns);

Proper patch to follow....
Comment 9 Ralph Böhme 2017-01-30 17:59:07 UTC
Created attachment 12868 [details]
Patch for master
Comment 10 Jeremy Allison 2017-01-30 18:07:48 UTC
Sorry for the previous bad review Ralph. Looking now..
Comment 11 Jeremy Allison 2017-01-30 22:29:18 UTC
Comment on attachment 12868 [details]
Patch for master

LGTM. Pushed. Sorry for the previous issue, I missed the fact that doing the goto done didn't call the setup_rpc_modules() function (the run_init_functions() doesn't do anything when mod_init_fns == NULL).
Comment 12 Ralph Böhme 2017-01-31 07:01:40 UTC
Created attachment 12883 [details]
Patch for 4.5 and 4.6 cherry-picked from master
Comment 13 Jeremy Allison 2017-01-31 20:41:35 UTC
Comment on attachment 12883 [details]
Patch for 4.5 and 4.6 cherry-picked from master

LGTM.
Comment 14 Jeremy Allison 2017-01-31 20:41:58 UTC
Karolin please push the additional patch to 4.6.next, 4.5.next.
Comment 15 Karolin Seeger 2017-02-01 11:38:19 UTC
(In reply to Jeremy Allison from comment #14)
Pushed additional patch to sutobuild-v4-{5,6}.
Comment 16 Karolin Seeger 2017-02-13 15:55:54 UTC
(In reply to Karolin Seeger from comment #15)
Pushed to both branches.
Closing out bug report.

Thanks!