Bug 9364

Summary: Long filename detection may not be working (in Jethro at least)
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Joshua Lock <joshuagloe>
Component: coreAssignee: Joshua Lock <joshuagloe>
Status: RESOLVED INVALID QA Contact: Aníbal Limón <anibal.limon>
Severity: normal    
Priority: High CC: anibal.limon, benjamin.esquivel, bogdanx.a.voiculescu, jose.a.lamego, meta.mr.watcher, meta.watcher
Version: 2.1   
Target Milestone: 2.1 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Joshua Lock 2016-03-31 13:17:17 UTC
A user on stack overflow reported [1] seeing "[Errno 36] File name too long" when trying to build with jethro on Ubuntu 14.04.

We are supposed to detect long filename support in sanity.bbclass but the user pasted a screenshot [2] of a backtrace which suggests this check didn't run even though the backtrace was triggered in do_configure of linux-libc-headers

We should verify that this check is still functional and ensure it is always run when appropriate to do so.

1. http://stackoverflow.com/questions/36291908/error-file-name-too-long-yocto-project
2. http://i.stack.imgur.com/0tATF.png
Comment 1 Joshua Lock 2016-03-31 15:02:22 UTC
Note it's expected that this will occur in master also but the report on stackoverflow specifically mentioned jethro — please test on master first.

To reproduce this issue we will need to build inside an Ubuntu eCrytpfs encrypted home directory (iirc this is an option during the user creation step of the ubuntu installer).

The long filename checking (check_create_long_filename) in sanity.bbclass is supposed to catch this issue on SSTATE_DIR and TMPDIR

Perhaps the issue is that the sanity check isn't running in certain circumstances? Or perhaps we aren't sanity checking enough directories?
Comment 2 Aníbal Limón 2016-03-31 17:46:27 UTC
(In reply to comment #1)
> Note it's expected that this will occur in master also but the report on
> stackoverflow specifically mentioned jethro — please test on master first.
> 
> To reproduce this issue we will need to build inside an Ubuntu eCrytpfs
> encrypted home directory (iirc this is an option during the user creation
> step of the ubuntu installer).
> 
> The long filename checking (check_create_long_filename) in sanity.bbclass is
> supposed to catch this issue on SSTATE_DIR and TMPDIR
> 
> Perhaps the issue is that the sanity check isn't running in certain
> circumstances? Or perhaps we aren't sanity checking enough directories?

I tried to reproduce this issue but the check works, i used ecryptfs Private folder under debian8 on master (3ece01215a7b038dbd5cde313754c42d134a887f). See,

alimon@alimonb-mobl1:~/Private/poky/build$ bitbake core-image-minimal 2>&1 > bitbake_log.txt
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Failed to create a file with a long name in TMPDIR. Please use a filesystem that does not unreasonably limit filename length.
Failed to create a file with a long name in SSTATE_DIR. Please use a filesystem that does not unreasonably limit filename length.

I've seen sanity issues before because the sanity tests only runs once at init of new build folder may be the user moved the build folder into a ecryptfs directory in that scenario the bug is reproducible.
Comment 3 Aníbal Limón 2016-03-31 17:48:45 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Note it's expected that this will occur in master also but the report on
> > stackoverflow specifically mentioned jethro — please test on master first.
> > 
> > To reproduce this issue we will need to build inside an Ubuntu eCrytpfs
> > encrypted home directory (iirc this is an option during the user creation
> > step of the ubuntu installer).
> > 
> > The long filename checking (check_create_long_filename) in sanity.bbclass is
> > supposed to catch this issue on SSTATE_DIR and TMPDIR
> > 
> > Perhaps the issue is that the sanity check isn't running in certain
> > circumstances? Or perhaps we aren't sanity checking enough directories?
> 
> I tried to reproduce this issue but the check works, i used ecryptfs Private
> folder under debian8 on master (3ece01215a7b038dbd5cde313754c42d134a887f).
> See,
> 
> alimon@alimonb-mobl1:~/Private/poky/build$ bitbake core-image-minimal 2>&1 >
> bitbake_log.txt
> ERROR:  OE-core's config sanity checker detected a potential
> misconfiguration.
>     Either fix the cause of this error or at your own risk disable the
> checker (see sanity.conf).
>     Following is the list of potential problems / advisories:
> 
>     Failed to create a file with a long name in TMPDIR. Please use a
> filesystem that does not unreasonably limit filename length.
> Failed to create a file with a long name in SSTATE_DIR. Please use a
> filesystem that does not unreasonably limit filename length.
> 
> I've seen sanity issues before because the sanity tests only runs once at
> init of new build folder may be the user moved the build folder into a
> ecryptfs directory in that scenario the bug is reproducible.

Also the check works on jethro.
Comment 4 Aníbal Limón 2016-03-31 18:00:44 UTC
Also works the case when move the folder in master,

ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Error, TMPDIR has changed location. You need to either move it back to /home/alimon/repos/poky/build-test/tmp or rebuild
Failed to create a file with a long name in SSTATE_DIR. Please use a filesystem that does not unreasonably limit filename length.


Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Comment 5 Jose Lamego 2016-03-31 22:12:26 UTC
I tried to replicate the issue using same configuration as reporter (Ubuntu 14.04 with encrypted home) without success: Sanity checker catches issue both in SSTATE_DIR and TMPDIR, both in master and in jethro branches.
Comment 6 Aníbal Limón 2016-04-01 15:58:24 UTC
Jose and me couldn't reproduce it the sanity check works as expected.

I guess the guy from stack overflow uses a special case (variable, modify code).
Comment 7 Benjamin Esquivel 2016-04-01 16:48:58 UTC
(In reply to comment #6)
> Jose and me couldn't reproduce it the sanity check works as expected.
Anibal, can you write here what was the procedure you tried for reproducing? I will try to reproduce it today and it would be good to document what we tried each of us.
> 
> I guess the guy from stack overflow uses a special case (variable, modify
> code).
Comment 8 Aníbal Limón 2016-04-01 16:57:39 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Jose and me couldn't reproduce it the sanity check works as expected.
> Anibal, can you write here what was the procedure you tried for reproducing?
> I will try to reproduce it today and it would be good to document what we
> tried each of us.
> > 
> > I guess the guy from stack overflow uses a special case (variable, modify
> > code).

Nothing special, same procedure for debian8 and ubuntu 14.04 inside ecryptfs,

$ git clone http://git.yoctoproject.org/git/poky -b jethro
$ cd poky
$ source oe-init-build-env
$ bitbake core-image-minimal

ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Error, TMPDIR has changed location. You need to either move it back to /home/alimon/repos/poky/build-test/tmp or rebuild
Failed to create a file with a long name in SSTATE_DIR. Please use a filesystem that does not unreasonably limit filename length.

The sanity test works!.
Comment 9 Joshua Lock 2016-04-05 09:42:53 UTC
It transpires that the user on StackOverflow worked around the sanity checker by copying the conf/sanity_info file from a working build…

http://stackoverflow.com/questions/36291908/error-file-name-too-long-yocto-project#comment60443714_36291908