-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix] Modify link order && fix getauxval #54598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix] Modify link order && fix getauxval #54598
Conversation
|
run buildall |
TPC-H: Total hot run time: 33626 ms |
TPC-DS: Total hot run time: 185033 ms |
ClickBench: Total hot run time: 32.1 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
TPC-H: Total hot run time: 34013 ms |
HappenLee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
TPC-DS: Total hot run time: 184893 ms |
ClickBench: Total hot run time: 33.12 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
airborne12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related PR: #54598 before 54598, logf is using impl from toolchain, after 54598, logf is using impl from doris glibc-compatibility Analysis from gpt5: ``` the 0x1ff << 23 part is evaluated in type int. 0x1ff = 511 decimal. Left-shifting it 23 bits gives 0x3ff800000 in math, which is way bigger than INT_MAX (on 32-bit signed int, any shift producing a bit in the sign position or beyond is undefined behavior in C). Even if ix and tmp are larger types, that constant expression is first computed as an int before any promotions, triggering the UB warning from UBSan. ``` Fix the problem below ```text #0 0x5632a618a17 in logf / root/doris/be/src/glibc-compatibility/musl/logf. c: 56:25 #1 0x5632a59fec26 in std:: log(float) /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/cmath: 334:12 #2 0x5632a59fcee3 in lucene:: index: :MultiLevelSkipListWriter::MultiLevelSkipListWriter(int, int, int) /root/doris/contrib/clucene/src/core/CLucene/index/SkipListWriter.cpp:70:56 #3 0x5632a59fe497 in lucene:: index: :DefaultSkipListWriter: :DefaultSkipListWriter(int, int, int, lucene::store::IndexOutput*, lucene::store: :IndexOutput*) /root/doris/contrib/clucene/src/core/CLucene/index/SkipListWriter. cpp:175:11 + echo 'cp -r /mnt/ssd01/pipline/0penSourceDoris/clusterEnv/PO//Cluster0/fe/bin /home/work/pipline/backup_center/54276_0b92341b39685a8528a1d769885cefe95197e7fb_p0/fe/' + cp -r /mnt/ssd01/pipline/0penSourceDoris/clusterEnv/PO//Cluster0/fe/conf /home/work/pipline/backup_center/54276_0b92341b39685a8528a1d769885cefe95197e7fb_p0/fe/ #4 0x5632a5affdb in lucene:: index:: SDocumentsWriter<char>: :writeSegment(std: :vector<std::__cxx11::basic_string<char, std: :char_traits<char>, std: :allocator<char> >, std: :allocator<std::_cxx11::basic_string<char, std:: char_traits<chars #5 0x5632a5af009e in lucene:: index::DocumentsWriter<char>:: flush(bool) /root/doris/contrib/clucene/src/core/Lucene/index/DocumentWriter. cpp: 1340:9 #6 0x5632a5a41842 in lucene:: index:: IndexWriter:: doFlush(bool) /root/doris/contrib/clucene/src/core/CLucene/index/IndexWriter. cpp:2262:58 #7 0x5632a5a1f59b in lucene:: index:: IndexWriter:: flush(bool, bool) / root/doris/contrib/clucene/src/core/CLucene/index/IndexWriter.cpp:2154:9 #8 0x5632a5a1dd09 in lucene:: index:: IndexWriter:: closeInternal(bool) /root/doris/contrib/clucene/src/core/CLucene/index/IndexWriter. cpp: 546:9 #9 0x5632a5a1d16e in lucene:: index:: IndexWriter:: close(bool) / root/doris/contrib/clucene/src/core/CLucene/index/IndexWriter.cpp: 519:9 #10 0x563282c28c76 in _ZN5doris10segment_v213finally_closeISt10unique_ptrIN6lucene5index11IndexWriterESt14default_deleteIS5_EEQ8HasCloseIT_EEEVRS9_RNS0_12ErrorContextE /root/doris/be/src/olap/rowset/segment_v2/inverted_index_common.h:56 #11 0x563282c3b9c2 in doris::segment_v2: :InvertedIndexColumnWriter<(doris::FieldType)17>::finish) /root/doris/be/src/olap/rowset/segment_v2/inverted index_writer. cpp: 687:9 #12 0x563282b9fble in doris:: segment_v2::ArrayColumnWriter::write_inverted_index() /root/doris/be/src/olap/rowset/segment_v2/column_writer.cpp: 940:41 #13 0x56328248ec in doris:: segment_v2::VerticalSegmentWriter::_write_inverted_index() /root/doris/be/src/olap/rowset/segment_v2/vertical_segment_writer.cpp: 1296:9 + echo cp -r /mnt/ssd01/pipline/0penSourceDoris/clusterEnv/P0//Cluster0/fe/log /home/work/pipline/backup_center/54276_0b92341b39685a8528a1d769885cefe95197e7fb_p0/fe/' #14 0x5632824d120 in doris::segment_v2::VerticalSegmentWriter::finalize_columns_indexunsigned long*) / root/doris/be/src/olap/rowset/segment_v2/vertical_segment_writer.cpp: 1204:5 + cp -r /mnt/ssd01/pipline/OpenSourceDoris/clusterEnv/P0//Cluster0/fe/log /home/work/pipline/backup_center/54276_0b92341b39685a8528a1d769885cefe95197e7fb_p0/fe/ #15 0x56328251046 in doris: :segment_v2: :VerticalSegmentWriter:: finalize(unsigned long*, unsigned long*) / root/doris/be/src/olap/rowset/segment_v2/vertical_segment_writer.cpp: 1253:5 #16 0x563282519a5a in doris: SegmentFlusher: :_flush_segment_writer(std: :unique_ptr<doris::segment_v2::VerticalSegmentWriter, std: :default_delete<doris::segment_v2: :VerticalSegmentWriter> >&, std: :shared_ptr<doris:: TabletSchema>, long*) #17 0x56328251642f in doris::SegmentFlusher::flush_single_block(doris::vectorized::Block const*, int, long*) /root/doris/be/src/olap/rowset/segment_creator.cpp:77:9 #18 0x563282521151 in doris::SegmentCreator::flush_single_block(doris::vectorized::Block const*, int, long*) /root/doris/be/src/olap/rowset/segment_creator.cpp: 389:5 #19 0x56329fe59dc4 in doris::BetaRowsetWriterV2:: flush_memtable(doris::vectorized::Block*, int, long*) /root/doris/be/src/olap/rowset/beta_rowset_writer_v2.cpp: 109:9 #20 0x56328215778 in doris:: FlushToken: :_do_flush_memtable(doris::MemTable*, int, long*) / root/doris/be/src/olap/memtable_flush_executor.cpp:210:9 #21 #22 0x56328217962 in doris:: FlushToken: :_flush_memtable(std: :shared_ptr<doris::MemTable>, int, long) / root/doris/be/src/olap/memtable_flush_executor. cpp:265:16 0x5632821f1f7d in doris::MemtableFlushTask:: run() /root/doris/be/src/olap/memtable_flush_executor.cpp:63:20 #23 0x56328437d33 in doris::ThreadPool::dispatch_thread() /root/doris/be/src/util/threadpool.cpp:614:24 #24 0x56328435аабс in std:: function<void ()›::operator()() const /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_function.h:593:9 #25 0x56328435aac in doris::Thread:: supervise_thread(void*) / root/doris/be/src/util/thread. cpp: 461:5 #26 0x56327fc4fd26 in asan_thread_start(void*) (/mnt/ssd01/pipline/0penSourceDoris/clusterEnv/P0/Cluster0/be/lib/doris_be+0x28da4d26) #27 0x7fdd62967608 in start_thread /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c: 477:8 #28 0x7fdd6287a132 in _clone /build/glibc-SzIz7B/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S: 95 ```
What problem does this PR solve?
A new version of getauxval.
Copied from https://github.com/amosbird/ldb_toolchain_gen/blob/main/glibc-compatibility/musl/getauxval.c
Fix the problem below:

Adjust the linkage order of libc to make sure interpose symbols correctly.
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)