Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1419718 > unrolled thread

Re: [GIT PULL] Ceph updates for 4.7-rc1

Started byArnd Bergmann <arnd@arndb.de>
First post2016-06-10 22:50 +0200
Last post2016-06-13 15:10 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [GIT PULL] Ceph updates for 4.7-rc1 Arnd Bergmann <arnd@arndb.de> - 2016-06-10 22:50 +0200
    Re: [GIT PULL] Ceph updates for 4.7-rc1 Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-10 23:40 +0200
      Re: [GIT PULL] Ceph updates for 4.7-rc1 Arnd Bergmann <arnd@arndb.de> - 2016-06-11 01:10 +0200
      Re: [GIT PULL] Ceph updates for 4.7-rc1 Arnd Bergmann <arnd@arndb.de> - 2016-06-12 00:50 +0200
      Re: [GIT PULL] Ceph updates for 4.7-rc1 Arnd Bergmann <arnd@arndb.de> - 2016-06-13 15:10 +0200

#1419718 — Re: [GIT PULL] Ceph updates for 4.7-rc1

FromArnd Bergmann <arnd@arndb.de>
Date2016-06-10 22:50 +0200
SubjectRe: [GIT PULL] Ceph updates for 4.7-rc1
Message-ID<rIBxn-1rC-13@gated-at.bofh.it>
On Thursday, May 26, 2016 2:18:03 PM CEST Sage Weil wrote:
> Hi Linus,
> 
> Please pull the following Ceph updates from
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git for-linus
> 
> This changeset has a few main parts:
> 
>  * Ilya has finished a huge refactoring effort to sync up the client-side 
> logic in libceph with the user-space client code, which has evolved 
> significantly over the last couple years, with lots of additional 
> behaviors (e.g., how requests are handled when cluster is full and 
> transitions from full to non-full).  This structure of the code is more 
> closely aligned with userspace now such that it will be much easier to 
> maintain going forward when behavior changes take place.  There are some 
> locking improvements bundled in as well.

I'm getting a warning in some ARM randconfig build:

WARNING: "ceph_monc_do_statfs" [fs/ceph/ceph.ko] has no CRC!                                             

I have bisected this down to this particular commit fcd00b68bbe:
 
> ----------------------------------------------------------------
> Ilya Dryomov (40):
>       libceph: DEFINE_RB_FUNCS macro

but I have no idea how the change relates to the symptom though.

What I see is that this one exported symbol has a __crc of a different
type from all the others:

$ nm net/ceph/mon_client.o | grep __crc
48c2e16e A __crc_ceph_monc_get_version
2360d633 A __crc_ceph_monc_get_version_async
0c50a10a A __crc_ceph_monc_got_map
         w __crc_ceph_monc_do_statfs
b63e5cf5 A __crc_ceph_monc_init
c4602476 A __crc_ceph_monc_open_session
5e6fd15f A __crc_ceph_monc_renew_subs
53a9ed7f A __crc_ceph_monc_stop
33a329fa A __crc_ceph_monc_validate_auth
34010ef9 A __crc_ceph_monc_wait_osdmap
29c50846 A __crc_ceph_monc_want_map

I only see this in some rare randconfig builds and have not figured out
which options are required, but I have also been able to reproduce it on
an x86 config and have uploaded the .config file to 
http://pastebin.com/raw/Dsrtfbcs 

	Arnd

[toc] | [next] | [standalone]


#1419747

FromLinus Torvalds <torvalds@linux-foundation.org>
Date2016-06-10 23:40 +0200
Message-ID<rICjM-28R-13@gated-at.bofh.it>
In reply to#1419718
On Fri, Jun 10, 2016 at 1:42 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>
> What I see is that this one exported symbol has a __crc of a different
> type from all the others:
>
> $ nm net/ceph/mon_client.o | grep __crc
> 48c2e16e A __crc_ceph_monc_get_version
> 2360d633 A __crc_ceph_monc_get_version_async
> 0c50a10a A __crc_ceph_monc_got_map
>          w __crc_ceph_monc_do_statfs

A lower-case 'w' in a symbol list just means that it's a local weak
symbol (with a upper-case 'A' meaning it's an absolute global).

Afaik, that simply means that it never got resolved, and genksyms
never generated that absolute value for it.

As to _why_ that happens, that's more than I can guess. We've had
problems with genksyms before, and it tends to be hard to debug.

Is it 100% reliable for you? Because the most common problem has been
issues with subtle build races, where just causing a re-build will fix
it.

Your config doesn't work for me, when I do

   cp ~/genksyms-config.txt .config
   make ARCH=i386 oldconfig

I get something else than what you had. I tried with both current -git
and the commit you pinpointed, so I don't know how you generated that
config file..

        Linus

[toc] | [prev] | [next] | [standalone]


#1419833

FromArnd Bergmann <arnd@arndb.de>
Date2016-06-11 01:10 +0200
Message-ID<rIDIR-3tH-5@gated-at.bofh.it>
In reply to#1419747
On Friday, June 10, 2016 2:32:21 PM CEST Linus Torvalds wrote:
> On Fri, Jun 10, 2016 at 1:42 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > What I see is that this one exported symbol has a __crc of a different
> > type from all the others:
> >
> > $ nm net/ceph/mon_client.o | grep __crc
> > 48c2e16e A __crc_ceph_monc_get_version
> > 2360d633 A __crc_ceph_monc_get_version_async
> > 0c50a10a A __crc_ceph_monc_got_map
> >          w __crc_ceph_monc_do_statfs
> 
> A lower-case 'w' in a symbol list just means that it's a local weak
> symbol (with a upper-case 'A' meaning it's an absolute global).
> 
> Afaik, that simply means that it never got resolved, and genksyms
> never generated that absolute value for it.
> 
> As to _why_ that happens, that's more than I can guess. We've had
> problems with genksyms before, and it tends to be hard to debug.
> 
> Is it 100% reliable for you? Because the most common problem has been
> issues with subtle build races, where just causing a re-build will fix
> it.

In a few thousand randconfig builds, this is the only symbol I ever
see the problem with, and I always see it with the same configurations
after rebuilding dozens of times, including with different compiler
versions (I only tried arm-gcc-4.9, arm-gcc-6.1 and x86-gcc-5.3, but
that seems to cover a wide range).

> Your config doesn't work for me, when I do
> 
>    cp ~/genksyms-config.txt .config
>    make ARCH=i386 oldconfig
> 
> I get something else than what you had. I tried with both current -git
> and the commit you pinpointed, so I don't know how you generated that
> config file..

I had not tried building the entire kernel on x86, and indeed I don't
see the warning there either, but I do see this one weak symbol in my
configuration:

arm-soc/obj-x86$ nm vmlinux | grep __crc | grep -w 'w'
         w __crc_ceph_monc_do_statfs

Also, the .config I first uploaded was based on my randconfig tree
that has some other changes to avoid all existing warnings. I've
done a 'make oldconfig' on your current HEAD now and put that
on http://pastebin.com/raw/EJBaG0FV just to make sure we have an
identical configuration.

The respective ARM .config file does produce the warning on
mainline, and I've uploaded that to http://pastebin.com/3NRSFSdr
I generated the x86 configuration by starting with this one
and running 'make olddefconfig ARCH=x86' on it.

I have found 15 more random configurations with the same symptom
now, and about 50 configurations with CONFIG_CEPH_FS=m that
don't show it, so I can mine the configurations for more hints
next week to see what influences it.

	Arnd

[toc] | [prev] | [next] | [standalone]


#1420082

FromArnd Bergmann <arnd@arndb.de>
Date2016-06-12 00:50 +0200
Message-ID<rIZT3-v2-9@gated-at.bofh.it>
In reply to#1419747
On Friday, June 10, 2016 2:32:21 PM CEST Linus Torvalds wrote:
> On Fri, Jun 10, 2016 at 1:42 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > What I see is that this one exported symbol has a __crc of a different
> > type from all the others:
> >
> > $ nm net/ceph/mon_client.o | grep __crc
> > 48c2e16e A __crc_ceph_monc_get_version
> > 2360d633 A __crc_ceph_monc_get_version_async
> > 0c50a10a A __crc_ceph_monc_got_map
> >          w __crc_ceph_monc_do_statfs
> 
> A lower-case 'w' in a symbol list just means that it's a local weak
> symbol (with a upper-case 'A' meaning it's an absolute global).
> 
> Afaik, that simply means that it never got resolved, and genksyms
> never generated that absolute value for it.
> 
> As to _why_ that happens, that's more than I can guess. We've had
> problems with genksyms before, and it tends to be hard to debug.

(Cc: Michal and Sam, who might understand this better)

I still don't know what goes wrong, but the patch below fixes it.
I have experimentally determined that the next EXPORT_SYMBOL() after
the DEFINE_RB_FUNCS line in net/ceph/mon_client.c ends up without
a checksum, and that adding a semicolon at the end of that line
makes it work fine.

However, there are other DEFINE_RB_FUNCS instances in
net/ceph/osd_client.c that don't suffer from this problem,
so I still have no clue why it helps, and we probably don't
want to apply the patch unless we know what the problem is.

	Arnd

diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
index 37c38a7fb5c5..1ac468920495 100644
--- a/net/ceph/mon_client.c
+++ b/net/ceph/mon_client.c
@@ -478,7 +478,7 @@ out:
 /*
  * generic requests (currently statfs, mon_get_version)
  */
-DEFINE_RB_FUNCS(generic_request, struct ceph_mon_generic_request, tid, node)
+DEFINE_RB_FUNCS(generic_request, struct ceph_mon_generic_request, tid, node);
 
 static void release_generic_request(struct kref *kref)
 {

[toc] | [prev] | [next] | [standalone]


#1420812

FromArnd Bergmann <arnd@arndb.de>
Date2016-06-13 15:10 +0200
Message-ID<rJzMS-6In-25@gated-at.bofh.it>
In reply to#1419747
On Friday, June 10, 2016 2:32:21 PM CEST Linus Torvalds wrote:
> On Fri, Jun 10, 2016 at 1:42 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > What I see is that this one exported symbol has a __crc of a different
> > type from all the others:
> >
> > $ nm net/ceph/mon_client.o | grep __crc
> > 48c2e16e A __crc_ceph_monc_get_version
> > 2360d633 A __crc_ceph_monc_get_version_async
> > 0c50a10a A __crc_ceph_monc_got_map
> >          w __crc_ceph_monc_do_statfs
> 
> A lower-case 'w' in a symbol list just means that it's a local weak
> symbol (with a upper-case 'A' meaning it's an absolute global).
> 
> Afaik, that simply means that it never got resolved, and genksyms
> never generated that absolute value for it.
> 
> As to _why_ that happens, that's more than I can guess. We've had
> problems with genksyms before, and it tends to be hard to debug.
> 
> Is it 100% reliable for you? Because the most common problem has been
> issues with subtle build races, where just causing a re-build will fix
> it.
> 
> Your config doesn't work for me, when I do
> 
>    cp ~/genksyms-config.txt .config
>    make ARCH=i386 oldconfig
> 
> I get something else than what you had. I tried with both current -git
> and the commit you pinpointed, so I don't know how you generated that
> config file..

I've tracked it down to the use of the 'typeof(((type *)0)->keyfld)'
expression in  DEFINE_RB_LOOKUP() now, and sent a patch with subject
"ceph: fix symbol versioning for ceph_monc_do_statfs" that works
around it by rewriting that line in a way that genksyms understands.

	Arnd

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web