This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 228943 - almost empty /var/tmp/exec11111111111111111111.log file
Summary: almost empty /var/tmp/exec11111111111111111111.log file
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project Discovery (show other bugs)
Version: 7.3.1
Hardware: PC Solaris
: P2 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-24 10:03 UTC by soldatov
Modified: 2013-11-13 12:58 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2013-04-24 10:03:35 UTC
sparc, S11 update 1

Scenario:
- Unpack clucene-core-0.9.21.tar.gz file
- Create new project (automatic mode)
- Check /var/tmp/exec1493274228112341711.log file
===> file is very small

called: /usr/bin/ld
        /export/home/hudson/projects/clucene-core-0.9.21/src
        /usr/bin/ld
        -G
        -dy
        -z
        text
        -Y
        P,/lib:/usr/lib
        -Qy
        -o
        .libs/libclucene.so.0.0.0
        -L/usr/gcc/4.5/lib/gcc/sparc-sun-solaris2.11/4.5.2
        -L/usr/ccs/lib
        -L/usr/gcc/4.5/lib/gcc/sparc-sun-solaris2.11/4.5.2/../../..
        -L/usr/gcc/4.5/lib/gcc/sparc-sun-solaris2.11/4.5.2
        -L/usr/ccs/lib
        -L/usr/gcc/4.5/lib/gcc/sparc-sun-solaris2.11/4.5.2/../../..
        /usr/gcc/4.5/lib/gcc/sparc-sun-solaris2.11/4.5.2/crti.o
        /usr/lib/values-Xa.o
        /usr/gcc/4.5/lib/gcc/sparc-sun-solaris2.11/4.5.2/crtbegin.o
        .libs/StdHeader.o
        .libs/gunichartables.o
        .libs/repl_lltot.o
        .libs/repl_tcscasecmp.o
        .libs/repl_tcslwr.o
        .libs/repl_tcstod.o
        .libs/repl_tcstoll.o
        .libs/repl_tprintf.o
        .libs/threads.o
        .libs/utf8.o
        .libs/BitSet.o
        .libs/dirent.o
        .libs/Equators.o
        .libs/FastCharStream.o
        .libs/fileinputstream.o
        .libs/MD5Digester.o
        .libs/Misc.o
        .libs/Reader.o
        .libs/StringBuffer.o
        .libs/StringIntern.o
        .libs/ThreadLocal.o
        .libs/FSDirectory.o
        .libs/IndexInput.o
        .libs/Lock.o
        .libs/IndexOutput.o
        .libs/MMapInput.o
        .libs/RAMDirectory.o
        .libs/TransactionalRAMDirectory.o
        .libs/condition.o
        .libs/error.o
        .libs/memtracking.o
        .libs/Analyzers.o
        .libs/AnalysisHeader.o
        .libs/StandardAnalyzer.o
        .libs/StandardFilter.o
        .libs/StandardTokenizer.o
        .libs/DateField.o
        .libs/Document.o
        .libs/Field.o
        .libs/CompoundFile.o
        .libs/DocumentWriter.o
        .libs/FieldInfos.o
        .libs/FieldsReader.o
        .libs/FieldsWriter.o
        .libs/IndexModifier.o
        .libs/IndexReader.o
        .libs/IndexWriter.o
        .libs/MultiReader.o
        .libs/SegmentInfos.o
        .libs/SegmentMergeInfo.o
        .libs/SegmentMerger.o
        .libs/SegmentMergeQueue.o
        .libs/SegmentReader.o
        .libs/SegmentTermDocs.o
        .libs/SegmentTermEnum.o
        .libs/SegmentTermPositions.o
        .libs/SegmentTermVector.o
        .libs/Term.o
        .libs/TermInfo.o
        .libs/TermInfosReader.o
        .libs/TermInfosWriter.o
        .libs/TermVectorReader.o
        .libs/TermVectorWriter.o
        .libs/Lexer.o
        .libs/QueryParser.o
        .libs/QueryParserBase.o
        .libs/QueryToken.o
        .libs/TokenList.o
        .libs/MultiFieldQueryParser.o
        .libs/BooleanQuery.o
        .libs/BooleanScorer.o
        .libs/DateFilter.o
        .libs/CachingWrapperFilter.o
        .libs/ChainedFilter.o
        .libs/ConjunctionScorer.o
        .libs/ExactPhraseScorer.o
        .libs/Explanation.o
        .libs/FieldCache.o
        .libs/FieldCacheImpl.o
        .libs/FieldSortedHitQueue.o
        .libs/FieldDocSortedHitQueue.o
        .libs/FilteredTermEnum.o
        .libs/FuzzyQuery.o
        .libs/Hits.o
        .libs/HitQueue.o
        .libs/IndexSearcher.o
        .libs/MultiSearcher.o
        .libs/MultiTermQuery.o
        .libs/PhrasePositions.o
        .libs/PhraseQuery.o
        .libs/PhraseScorer.o
        .libs/PrefixQuery.o
        .libs/QueryFilter.o
        .libs/RangeFilter.o
        .libs/RangeQuery.o
        .libs/SearchHeader.o
        .libs/Similarity.o
        .libs/SloppyPhraseScorer.o
        .libs/Sort.o
        .libs/TermQuery.o
        .libs/TermScorer.o
        .libs/WildcardQuery.o
        .libs/WildcardTermEnum.o
        -lstdc++
        -lm
        -lgcc_s
        /usr/gcc/4.5/lib/gcc/sparc-sun-solaris2.11/4.5.2/crtend.o
        /usr/gcc/4.5/lib/gcc/sparc-sun-solaris2.11/4.5.2/crtn.o
        -h
        libclucene.so.0
Comment 1 Alexander Simon 2013-04-25 10:33:30 UTC
Investigation:

Bug is Solaris 11 specific (both architecture).
Command executed by sh eval construction is not interposed by preload library.
For example, script:

#! /bin/sh
echo=/usr/ucb/echo
show="$echo"
run=
command="gcc -c source.c"
$show "$command"
if $run eval "$command"; then :
else
  exit -1
fi

executes two commands: echo and gcc.
1. exec of echo is interposed
2. exec of gcc is not interposed.

Note Utility truss see both execs.
Comment 2 Alexander Simon 2013-04-25 10:52:59 UTC
Probably bag related with new system call introdused in Solaris 11:
 int fexecve(int fd, char *const argv[], char *const envp[]);
Comment 3 Leonid Lenyashin 2013-05-21 17:44:01 UTC
Please evaluate
Comment 4 Alexander Simon 2013-05-22 07:43:28 UTC
Evaluation:
The bug significant disimproves discovery by a "build analyzer".
The "build analyzer" considers a produced "exec" log as a first class provider and relies on it.
So consequences of the bug is:
A project that uses "libtool" for building project will have an empty code assistance.
Work around:
Turn off "build analyzer", reconfiure code assistance by build log or configure code assistance by binary files (if they have debug information).

Evaluation:
Risk of "build analyzer cannot be fixed" is high.
Probably build analyzer should be rewritten to use the same technology the truss uses.
Comment 5 Vladimir Voskresensky 2013-05-22 09:22:19 UTC
What if discover falls back to build output analysis, compare it with exec log analysis and decide what is the best (or merge exec log into build log when exec log contains significantly less information)
Comment 7 Alexander Simon 2013-06-25 09:32:08 UTC
It is known problem: ksh uses system calls vfork+execve that cannot be interposed.
Cannot be fixed in "interposing" technology.
Work around:
- make bash default sh.
Work around in the IDE:
- turn off Project Properties->Code Assistance->Use Build Analyzer and reconfigure project by make log.
Comment 8 Alexander Simon 2013-08-21 08:33:49 UTC
Simple work around is a wrapper of a tool collection.
For example wrapper for /opt/csw/bin/gcc and /opt/csw/bin/g++:
- create folder
- add in the folder two scripts:
gcc:
#!/bin/sh
exec /opt/csw/bin/gcc "$@"

g++:
#!/bin/sh
exec /opt/csw/bin/g++ "$@"

- use tool collection from the folder
- "interposing" technology will work for tool wrapper
Comment 9 Alexander Simon 2013-09-17 07:48:11 UTC
solution:
interpose posix_spawn() function.
Comment 10 Alexander Simon 2013-09-20 16:41:23 UTC
change set:
7bfc07f4deec
Comment 11 Quality Engineering 2013-09-26 02:08:49 UTC
Integrated into 'main-silver', will be available in build *201309260002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/bac8e87cf08e
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #228943 almost empty /var/tmp/exec11111111111111111111.log file
(transplanted from 7bfc07f4deecd49cd878cb7af65470b141f73e93)
Comment 12 soldatov 2013-11-13 12:58:25 UTC
verified in NetBeans 7.4 patch1 build