Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 52A73160C05 for ; Wed, 3 Jan 2018 20:43:44 +0100 (CET) Received: (qmail 10395 invoked by uid 500); 3 Jan 2018 19:43:43 -0000 Mailing-List: contact dev-help@impala.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.apache.org Delivered-To: mailing list dev@impala.apache.org Received: (qmail 10380 invoked by uid 99); 3 Jan 2018 19:43:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jan 2018 19:43:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id BE5F0C1BD3 for ; Wed, 3 Jan 2018 19:43:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.398 X-Spam-Level: ** X-Spam-Status: No, score=2.398 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 8fOZzQMRelVs for ; Wed, 3 Jan 2018 19:43:40 +0000 (UTC) Received: from mail-io0-f182.google.com (mail-io0-f182.google.com [209.85.223.182]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 28E095F24E for ; Wed, 3 Jan 2018 19:43:40 +0000 (UTC) Received: by mail-io0-f182.google.com with SMTP id 14so3225052iou.2 for ; Wed, 03 Jan 2018 11:43:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ajESEbtbLKXSW9cMQzfPfUMggZDfeSMSGhbLV7gGoYo=; b=gPPGXg+vri0vE4QxGi3pElfWWs/FW8cEZ72saqOGMNvAt+g6+4ObS5e1Ovu/6oG2LS 44rVMtnBgHjE2MaQU2nAOG5gbVyhOcUtf5FsKn8bgA52wbK3cB93i0A4TWVLzIjt7CND 7V6oadSA8zGb6iMQTRiqDENsw60r3TsvwKx/UCv3sB9e7cyekPfmFL0jvOFqOz7pbASR TkCEbG/lwJwg3yC+9Pw9COOlnRX1PI3SUS+05T8ADTXd8IS9FCnVEMlBJ0ILh7kMiyoZ FFUHv9QknZ9pOZ2lQzFVFt4X0sP0qAgap8EPWj/rvu8dlVLd3PQHAFtadXQDDnh5oHOx E/Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ajESEbtbLKXSW9cMQzfPfUMggZDfeSMSGhbLV7gGoYo=; b=WiLZzyZsFO7Or6+ALbolsgZlCO6zJ71vE7XIH6UpeYZQXPswDyFnLag58arisfvC6x SVKfrfT2LkUHBDMRgAvMiJNVuhMCkcn8E28XBxam2k70hc8SJvjTH0NXG/BwqMr7TChs rXNvTwXP0F1JYHhPXr9logaQOG9O2WL3IVOooDjvAkkHGbQ4soQs/Q7/4MRfusbbQzkH YpVnvrDrL+JCF69oo95IMKNAGbCJ9PbjiRVFfm9+x5WIZNOkcJW4HfAEsHFZlfDpHbwP gS8hj1v62CAe9MHcYGaJKZy/R+dfKfcqiOpuTMnQ1g6C8eHkkEbnFlJtTR+dhCNVgJgx JQcg== X-Gm-Message-State: AKGB3mIY1BErJIlPdLH8UwoA0o7FUwWRNUQvyrryYITOo9haa9QCqH3a aQD3Bi4wbxV7cqrcCDbjud0/vCegjt6bYg0yfXCoaw== X-Google-Smtp-Source: ACJfBosrBhvOGuFj83Hq5ISU6L2RTfiFNCibFIGTg1Z1KvTGyD9k3HouY/vfwdsL3xP4BGIqS0YmOL2jBBBhGS5bac8= X-Received: by 10.107.129.40 with SMTP id c40mr2609488iod.169.1515008618782; Wed, 03 Jan 2018 11:43:38 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Thomas Tauber-Marshall Date: Wed, 03 Jan 2018 19:43:28 +0000 Message-ID: Subject: Re: New Impala Contributors: IMPALA-6296 To: dev@impala.apache.org Content-Type: multipart/alternative; boundary="001a113ed4f28e0d070561e46ec4" archived-at: Wed, 03 Jan 2018 19:43:45 -0000 --001a113ed4f28e0d070561e46ec4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 3, 2018 at 10:06 AM Manaswini Maharana wrote: > Thanks for the pointers, Thomas. I was able to run the Jenkin tests, but > not sure how to manually add the links to Gerrit as recommended. Do I ad= d > it through the reply text box as shown below? > Yes, you can just post it as a comment on the review using the "Reply" button > > - Mansi > =E2=80=8B > > On Tue, Jan 2, 2018 at 3:04 PM, Thomas Tauber-Marshall < > tmarshall@cloudera.com> wrote: > >> On Fri, Dec 29, 2017 at 11:12 AM Manaswini Maharana < >> mmaharana@cloudera.com> >> wrote: >> >> > I've pushed the initial changes to - >> > https://gerrit.cloudera.org/#/c/8923/ >> > >> > Steps that I've followed to make this contribution - As this is my >> first, >> > I want to elaborate a little bit to ensure I'm covering the bases righ= t. >> > >> > 1. After the following the extensive contribution guide >> > > < >> https://cwiki.apache.org/confluence/display/IMPALA/Contributing+to+Impal= a >> >, > > >> > setup the development environment on machine with Ubuntu 16.04 OS, 15 = GB >> > memory, Intel=C2=AE Core=E2=84=A2 i7-8550U CPU @ 1.80GHz =C3=97 8 & 5= 12 GB SSD >> > 2. Modified the build process to avoiding building against -so >> > (IMPALA-5365 & IMPALA-3926) >> > 3. Reproduced the issue. Attached Impalad error log. >> > 4. Put in the code fix - added a condition check to ensure >> > 'emit_perf_map_' evaluates to true before the dependent >> > object(perf_map_lock_) is asserted using DCHECK. >> > 5. Unit tested the changes using Impala-shell. No daemon crash >> encountered >> > this time. >> > 6. Loaded and ran the "be" unit test cases to ensure the change did no= t >> > break other stuff. Attached the results. >> > >> > >> > Questions I have: >> > 1. Is it recommened to run more end-to-end unit tests or does it depen= d >> on >> > the intensity of the change ? Like here I've limited it to just runnin= g >> be >> > tests, is that ok? >> > >> >> In general, you're expected to run any tests that may reasonably be >> affected by the change, and of course the more testing the better. This >> change affects basically any query that uses codegen, which is a >> significant portion of our tests, so running the full suite would probab= ly >> be a good idea (eg bin/run-all-tests.sh) >> >> You may also want to try out the Jenkins jobs that we provide for testin= g >> patches, as described here: >> >> https://cwiki.apache.org/confluence/display/IMPALA/Using+Gerrit+to+submi= t+and+review+patches#UsingGerrittosubmitandreviewpatches-Verifyingapatch(op= entoallImpalacontributors) >> >> >> > 2. As per Tim's comment, I should see *.asm files in codegen-modules >> after >> > the fix, but I don't see any. Am I missing anything ? >> > >> >> You may need to manually create the directory >> $IMPALA_HOME/codegen-modules/ >> >> >> > >> > Thanks & appreciate your input, >> > Mansi >> > >> > >> > On Fri, Dec 29, 2017 at 12:43 PM, Manaswini Maharana < >> > mmaharana@cloudera.com> wrote: >> > >> >> Thank you! >> >> >> >> On Fri, Dec 29, 2017 at 11:47 AM, Jim Apple >> wrote: >> >> >> >>> Done >> >>> On Fri, Dec 29, 2017 at 7:12 AM, Manaswini Maharana >> >>> wrote: >> >>> > username: mmaharana >> >>> > >> >>> > On Fri, Dec 29, 2017 at 10:07 AM, Jin Chul Kim >> >>> wrote: >> >>> > >> >>> >> Hi, >> >>> >> >> >>> >> I guess she doesn't have a privilege to change assignee. The >> >>> permission >> >>> >> should be provided by somebody who has an admin privilege. >> >>> >> @Mansi, please share your username. >> >>> >> >> >>> >> Best regards, >> >>> >> Jinchul >> >>> >> >> >>> >> 2017-12-30 0:02 GMT+09:00 Vincent Tran : >> >>> >> >> >>> >> > You should be able to just simply "assign to me" if you are >> signed >> >>> into >> >>> >> ADD >> >>> >> > Jira. >> >>> >> > >> >>> >> > On Dec 29, 2017 9:54 AM, "Manaswini Maharana" < >> >>> mmaharana@cloudera.com> >> >>> >> > wrote: >> >>> >> > >> >>> >> > > Good morning, Team - any update on this? >> >>> >> > > >> >>> >> > > - Mansi >> >>> >> > > >> >>> >> > > >> >>> >> > > On Thu, Dec 28, 2017 at 12:32 AM, Manaswini Maharana < >> >>> >> > > mmaharana@cloudera.com >> >>> >> > > > wrote: >> >>> >> > > >> >>> >> > > > Hello team, I'd like to contribute to Impala and would like >> to >> >>> start >> >>> >> it >> >>> >> > > > with this (IMPALA-6296) jira. Can I please have it assigned >> to >> >>> me? >> >>> >> > > > >> >>> >> > > > My development environment is ready. I'm on ubuntu 16.04 so >> yes >> >>> some >> >>> >> > > > challenges to set up the environment especially with the >> >>> >> > LD_LIBRARY_PATH >> >>> >> > > > issues. So far I'm able to work past it and might ask for >> >>> another >> >>> >> pair >> >>> >> > of >> >>> >> > > > eyes to ensure it follows standard. The builds are going fi= ne >> >>> and >> >>> >> runs >> >>> >> > a >> >>> >> > > > bit longer as I've disabled the -so. Apart from setup, I'm >> was >> >>> able >> >>> >> to >> >>> >> > > > reproduce the issue and might have been ready with the fix >> >>> which I'd >> >>> >> > like >> >>> >> > > > to discuss once I'm officially assigned the jira. >> >>> >> > > > >> >>> >> > > > Thanks Tim, for the instructions, it was very helpful. >> >>> >> > > > >> >>> >> > > > >> >>> >> > > > Thanks! >> >>> >> > > > Mansi >> >>> >> > > > >> >>> >> > > > >> >>> >> > > > >> >>> >> > > > On Tue, Dec 12, 2017 at 8:24 PM, Tim Armstrong < >> >>> >> > tarmstrong@cloudera.com> >> >>> >> > > > wrote: >> >>> >> > > > >> >>> >> > > >> If you'd like to contribute a patch to Impala, but aren't >> sure >> >>> what >> >>> >> > > >> you want to work on, you can look at Impala's newbie issue= s: >> >>> >> > > >> https://issues.apache.org/jira/issues/?filter=3D12341668. = You >> >>> can >> >>> >> find >> >>> >> > > >> detailed instructions on submitting patches at >> >>> >> > > >> https://cwiki.apache.org/confluence/display/IMPALA/ >> >>> >> > > Contributing+to+Impala >> >>> >> > > >> . >> >>> >> > > >> This is a walkthrough of a ticket a new contributor could >> take >> >>> on, >> >>> >> > > >> with hopefully enough detail to get you going but not so >> much >> >>> to >> >>> >> take >> >>> >> > > >> away the fun. >> >>> >> > > >> >> >>> >> > > >> How can we solve >> >>> https://issues.apache.org/jira/browse/IMPALA-6296, >> >>> >> > > >> "DCheck in CodegenSymbolEmitter when --asm_module_dir is >> set on >> >>> >> debug >> >>> >> > > >> build >> >>> >> > > >> "? >> >>> >> > > >> First, make sure you have your development environment set >> up. >> >>> Let's >> >>> >> > > >> see if we can reproduce the issue. >> >>> >> > > >> >> >>> >> > > >> Create a directory for the codegen modules then start >> >>> impala-server >> >>> >> > > >> $ mkdir codegen-modules >> >>> >> > > >> $ start-impala-cluster.py --impalad_args=3D"--opt_module_d >> >>> >> > > >> ir=3Dcodegen-modules >> >>> >> > > >> --unopt_module_dir=3Dcodegen-modules --asm_module_dir=3Dco= degen- >> >>> >> modules" >> >>> >> > > >> >> >>> >> > > >> Now run a query through Impala. I chose this query because >> it >> >>> uses >> >>> >> > > >> Impala's >> >>> >> > > >> runtime code generation ("codegen") to improve performance >> >>> >> > > >> $ bin/impala-shell.sh -q "select count(*) from >> tpch.lineitem" >> >>> >> > > >> >> >>> >> > > >> After a few seconds, you should see an error from Impala >> >>> crashing: >> >>> >> > > >> Error communicating with impalad: TSocket read 0 bytes >> >>> >> > > >> Could not execute command: select count(*) from >> tpch.lineitem >> >>> >> > > >> >> >>> >> > > >> Attempting to run any further queries will fail because of >> the >> >>> >> crashed >> >>> >> > > >> Impala daemons: >> >>> >> > > >> $ impala-shell.sh -q "select count(*) from tpch.lineitem"; >> >>> >> > > >> Starting Impala Shell without Kerberos authentication >> >>> >> > > >> Error connecting: TTransportException, Could not connect t= o >> >>> >> > > >> localhost:21000 >> >>> >> > > >> Not connected to Impala, could not execute queries. >> >>> >> > > >> >> >>> >> > > >> If you look at logs/cluster/impalad.ERROR you will see a >> >>> message >> >>> >> > > >> explaining >> >>> >> > > >> the crash - we hit a DCHECK (a.k.a. an assertion): >> >>> >> > > >> >> >>> >> > > >> F1212 17:10:07.642722 9138 codegen-symbol-emitter.cc:90] >> Check >> >>> >> > failed: >> >>> >> > > >> perf_map_.find(obj.getData().data()) !=3D perf_map_.end() >> >>> >> > > >> *** Check failure stack trace: *** >> >>> >> > > >> @ 0x3be16ed google::LogMessage::Fail() >> >>> >> > > >> @ 0x3be2f92 google::LogMessage::SendToLog() >> >>> >> > > >> @ 0x3be10c7 google::LogMessage::Flush() >> >>> >> > > >> @ 0x3be468e google::LogMessageFatal::~ >> >>> >> LogMessageFatal() >> >>> >> > > >> @ 0x1b354f1 >> >>> >> > > >> impala::CodegenSymbolEmitter::NotifyFreeingObject() >> >>> >> > > >> @ 0x375b791 llvm::MCJIT::NotifyFreeingObject= () >> >>> >> > > >> @ 0x375b811 llvm::MCJIT::~MCJIT() >> >>> >> > > >> @ 0x375bfc9 llvm::MCJIT::~MCJIT() >> >>> >> > > >> @ 0x1b265ba >> std::default_delete<>::operator()() >> >>> >> > > >> @ 0x1b23e21 std::unique_ptr<>::reset() >> >>> >> > > >> @ 0x1b11198 impala::LlvmCodeGen::Close() >> >>> >> > > >> @ 0x182194d >> >>> impala::RuntimeState::ReleaseResources() >> >>> >> > > >> @ 0x1893a35 >> >>> impala::FragmentInstanceState::Close() >> >>> >> > > >> @ 0x1890d58 >> impala::FragmentInstanceState::Exec() >> >>> >> > > >> @ 0x1879afa >> impala::QueryState::ExecFInstance() >> >>> >> > > >> @ 0x18783bc >> >>> >> > > >> _ZZN6impala10QueryState15StartFInstancesEvENKUlvE_clEv >> >>> >> > > >> @ 0x187a739 >> >>> >> > > >> _ZN5boost6detail8function26void_function_obj_invoker0IZN6i= mp >> >>> >> > > >> ala10QueryState15StartFInstancesEvEUlvE_vE6invokeERNS1_ >> >>> >> > > 15function_bufferE >> >>> >> > > >> @ 0x17c7200 boost::function0<>::operator()() >> >>> >> > > >> @ 0x1abdf8b impala::Thread::SuperviseThread(= ) >> >>> >> > > >> @ 0x1ac6b16 >> boost::_bi::list4<>::operator()<>() >> >>> >> > > >> @ 0x1ac6a59 boost::_bi::bind_t<>::operator()= () >> >>> >> > > >> @ 0x1ac6a1c >> boost::detail::thread_data<>::run() >> >>> >> > > >> @ 0x2d6b08a thread_proxy >> >>> >> > > >> @ 0x7fcb5ff146ba start_thread >> >>> >> > > >> @ 0x7fcb5fc4a3dd clone >> >>> >> > > >> >> >>> >> > > >> It looks like something is wrong with the code - 'perf_map= _' >> >>> doesn't >> >>> >> > > have >> >>> >> > > >> anything in it. If we look a few lines above, it looks lik= e >> >>> >> > 'perf_map_' >> >>> >> > > is >> >>> >> > > >> only filled in if 'emit_perf_map_' is true. >> >>> >> > > >> >> >>> >> > > >> if (emit_perf_map_) { >> >>> >> > > >> lock_guard perf_map_lock(perf_map_lock_); >> >>> >> > > >> DCHECK(perf_map_.find(obj.getData().data()) =3D=3D >> >>> >> perf_map_.end()); >> >>> >> > > >> perf_map_[obj.getData().data()] =3D >> >>> std::move(perf_map_entries); >> >>> >> > > >> WritePerfMapLocked(); >> >>> >> > > >> } >> >>> >> > > >> >> >>> >> > > >> Maybe we should also be checking 'emit_perf_map_' before t= he >> >>> DCHECK? >> >>> >> > > >> >> >>> >> > > >> After you have fixed this bug, you should be able to run t= he >> >>> query >> >>> >> > > without >> >>> >> > > >> Impala crashing and you should be able to inspect the >> assembly >> >>> >> > generated >> >>> >> > > >> by >> >>> >> > > >> Impala in codegen-modules/*.asm >> >>> >> > > >> >> >>> >> > > >> Have fun, and don't be afraid to ask dev@impala.apache.org >> is >> >>> you >> >>> >> > have >> >>> >> > > >> any questions! >> >>> >> > > >> >> >>> >> > > > >> >>> >> > > > >> >>> >> > > >> >>> >> > >> >>> >> >> >>> >> >> >> >> >> > >> > --001a113ed4f28e0d070561e46ec4--