No profiling support

Bug #1846947 reported by StoatWblr
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Fix Released
Wishlist
Andreas Hasenack

Bug Description

The samba packages have been compiled without support for profiling (-P1 flag at start or "smbd profiling level = on" in smb.conf)

This breaks netdata's ability to monitor the daemon and may break other monitoring packages too.

Tags: server-todo

CVE References

Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

It would help if you could could please explain if and why compiling with profiling support is important to the majority of Ubuntu users.

I'm also curious as to why upstream doesn't enable profiling in the build by default. Is there a downside to enabling profiling, such as any performance degradation? I would not be happy enabling a compile-time option, against upstream defaults, without a report examining any potential downsides. It might be easier to get upstream to enable profiling in the build by default - then all distributions will get this feature.

Before this feature can be enabled, I think we need:

1) A full explanation of the use cases this would enable

2) An explanation as to why this is appropriate for Ubuntu to enable by default when it isn't enabled by default upstream

3) An explanation as to why this is appropriate for Ubuntu to enable by default when it isn't enabled by default in Debian

4) A report explaining the outcome of an investigation of any potential downsides of making this change

Once those four things are explained, and assuming that following the explanation it still makes sense to do this in Ubuntu, please change the bug status back to New. If, following investigation, it is no longer appropriate to make the change in Ubuntu, then please comment and then change the bug status to Invalid.

Changed in samba (Ubuntu):
status: New → Incomplete
importance: Undecided → Wishlist
summary: - no profiling support in (at least) 19.10 - breaks netdata
+ No profiling support
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for samba (Ubuntu) because there has been no activity for 60 days.]

Changed in samba (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Kees van Vloten (kvv) wrote :

ad 1,2) Ubuntu provides both Netdata and Samba. Unfortunately the integration between the two is missing and therefor Netdata is currently unable to monitor Samba resources.

For Netdata to monitor Samba it runs 'smbstatus -P', however this option is only available when Samba is compiled with support for profiling and when the option 'smbd profiling level = on' is specified in smb.conf

ad 3) This issue can indeed be solved by Debian, indeed the most logical way to go forward is to create an upstream issue.

ad 4) From Samba 2.2.5 release notes (18th June 2002):
With samba compiled for profile data collection, you may see
a very slight degradation in performance even with profiling
collection turned off. On initial tests with NetBench on an
SGI Origin 200 server, this degradation was not measurable
with profile collection off compared to no profile collection
compiled into samba.

With count profile collection enabled on all clients, the
degradation was less than 2%. With full profile collection
enabled on all clients, the degradation was about 8.5%.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks for the explanations, now one can much better follow what this is about!

Changed in samba (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote (last edit ):

Hi,
I come by retriaging old bugs that have been dormant for too long giving them a second change.
Right now is IMHO the right time (well again, the original report was as well) to give this a shot. We are just after an LTS could try it out and revert later if needed.

I see fixes applied for profiling by upstream every now and then, so it isn't dead.
If the performance overhead while disabled is indeed negligible then why not enabling it.

But as outlined before we'd want to do so together with Debian, so next steps (for us):
1. To be safe - kick off a discussion with upstream why it never has been default enabled
2. Prep a change that enables this at build time (and tests it)
3. Submit that (plus a bug if needed) for discussion with Debian

Bonus: In openvswitch when we were unsure about the supportability of DPDK enabled for non DPDK environments we ended up building openvswitch twice - not sure if that is feasible with the many libs and packages of samba - but it is one more option to consider (make an extra opt-in profile enabled binary).

Adding server-todo (not do do it, but to give it a bit more time to evaluate what would happen and dirve the #1 discussion of above)

tags: added: server-todo
Changed in samba (Ubuntu):
assignee: nobody → Andreas Hasenack (ahasenack)
status: Confirmed → In Progress
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

No todo for netdata, we can drop that task.

no longer affects: netdata (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.6 KiB)

This bug was fixed in the package samba - 2:4.16.1+dfsg-8ubuntu1

---------------
samba (2:4.16.1+dfsg-8ubuntu1) kinetic; urgency=medium

  * Merge with Debian unstable (LP: #1971256, LP: #1846947). Remaining
    changes:
    - d/p/VERSION.patch: Update vendor string to "Ubuntu".
    - debian/smb.conf;
      + Add "(Samba, Ubuntu)" to server string.
      + Comment out the default [homes] share, and add a comment about
        "valid users = %s" to show users how to restrict access to
        \\server\username to only username.
    - debian/control: Ubuntu i386 binary compatibility:
      + drop ceph support
    - d/control: enable the liburing vfs module, except on i386 where
      liburing is not available
    - d/t/{cifs-share-access-uring,smbclient-share-access-uring}:
      Skip running the tests if on i386 platform, because the uring
      package is not available there.
    - d/t/util: fix setting the password of the smb test user
      (LP #1955851)
    - Update nfs scripts for new nfs.conf config (LP #1961840):
      + d/p/fix-nfs-service-name-to-nfs-kernel-server.patch: updated to use
        nfsconf(8) if it's available, instead of parsing the old config
        files in /etc/default/nfs-*
      + d/ctdb.example/nfs-kernel-server/nfs.conf: /etc/nfs.conf to be
        used by the example enable-nfs.sh example script
      + d/ctdb.example/nfs-kernel-server/ctdb.example.quota: quota
        config file to be used by the example enable-nfs.sh script
      + d/ctdb.example/nfs-kernel-server/nfs-{common,kernel-server}:
        obsolete, replaced by nfs.conf
      + d/ctdb.example/nfs-kernel-server/enable-nfs.sh: handle new
        nfs.conf and other changes in the new nfs server packages
    - Build dlz module for bind 9.18.x (LP #1964032)
      + d/p/add-support-for-bind-918.patch: build a dlz module for
        bind 9.18.x
      + d/p/add-support-for-bind-918-2.patch: also update the
        provisioning tool and template config file
    - d/rules: in Ubuntu, glusterfs is not built for i386, so don't
      enable the samba glusterfs vfs mofule in that case
    - d/control: build-depend on libglusterfs-dev only on !i386 arches
  * Dropped:
    - d/control: add a versioned libgnutls28-dev build-depends to reduce
      the amount of in-tree crypto code that is built
      [superfluous, the version in the archive is recent enough]
    - d/samba.postinst: do not populate sambashare from the Ubuntu admin group (LP 1942195)
      [Included in 2:4.13.13+dfsg-1]
    - d/control: bump required build-depends
      [Included in Debian]
    - d/samba-libs.install: update list of installed libraries and
      modules/plugins
      [Done in Debian]
    - debian/patches/CVE-2021-20254.patch: removed, applied upstream
      [Applied upstream, Debian didn't have this patch]
    - d/p/Rename-mdfind-to-mdsearch.patch: removed, applied usptream
      [Applied usptream, Debian did not have it]
    - d/{gpb.conf,watch,README.source}: update for 4.15
      [Debian updated it for 4.16]
    - d/rules: remove --with-dnsupdate, it was merged with
      --with-ads in samba 4.15.0
      [Included in 2:4.16.0+dfsg-1]
    - d/rules: drop removal of ctdb tests, they ...

Read more...

Changed in samba (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
mrvst (maravento) wrote (last edit ):

same problem Version 4.15.13-Ubuntu

"INFO: Profiling support unavailable in this build"

and the samba log is full of those messages

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Hello mrvst,

Based on the version you mentioned, I'm assuming you're using Focal. Could you please provide the full package version you have there?

Also, judging by the fact that this bug is a Wishlist and that it hasn't been SRUed into Jammy, I find it extremely unlikely that it can be fixed in Focal.

Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.